aio: cleanup: flatten kill_ioctx()
There is no need to have most of the code in kill_ioctx() indented. Flatten it. Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
This commit is contained in:
8
fs/aio.c
8
fs/aio.c
@@ -730,9 +730,12 @@ err:
|
|||||||
static int kill_ioctx(struct mm_struct *mm, struct kioctx *ctx,
|
static int kill_ioctx(struct mm_struct *mm, struct kioctx *ctx,
|
||||||
struct completion *requests_done)
|
struct completion *requests_done)
|
||||||
{
|
{
|
||||||
if (!atomic_xchg(&ctx->dead, 1)) {
|
|
||||||
struct kioctx_table *table;
|
struct kioctx_table *table;
|
||||||
|
|
||||||
|
if (atomic_xchg(&ctx->dead, 1))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
||||||
spin_lock(&mm->ioctx_lock);
|
spin_lock(&mm->ioctx_lock);
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
table = rcu_dereference(mm->ioctx_table);
|
table = rcu_dereference(mm->ioctx_table);
|
||||||
@@ -760,9 +763,6 @@ static int kill_ioctx(struct mm_struct *mm, struct kioctx *ctx,
|
|||||||
ctx->requests_done = requests_done;
|
ctx->requests_done = requests_done;
|
||||||
percpu_ref_kill(&ctx->users);
|
percpu_ref_kill(&ctx->users);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait_on_sync_kiocb:
|
/* wait_on_sync_kiocb:
|
||||||
|
|||||||
Reference in New Issue
Block a user