mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
aio: kill ki_key
ki_key wasn't actually used for anything previously - it was always 0. Drop it to trim struct kiocb a bit. Signed-off-by: Kent Overstreet <[email protected]> Cc: Zach Brown <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Asai Thambi S P <[email protected]> Cc: Selvan Mani <[email protected]> Cc: Sam Bradshaw <[email protected]> Cc: Jeff Moyer <[email protected]> Cc: Al Viro <[email protected]> Cc: Benjamin LaHaise <[email protected]> Reviewed-by: "Theodore Ts'o" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4e23bcaeb9
commit
8a6608907c
2 changed files with 9 additions and 7 deletions
7
fs/aio.c
7
fs/aio.c
|
|
@ -1159,7 +1159,7 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
|
|||
}
|
||||
}
|
||||
|
||||
ret = put_user(req->ki_key, &user_iocb->aio_key);
|
||||
ret = put_user(KIOCB_KEY, &user_iocb->aio_key);
|
||||
if (unlikely(ret)) {
|
||||
pr_debug("EFAULT: aio_key\n");
|
||||
goto out_put_req;
|
||||
|
|
@ -1281,10 +1281,13 @@ static struct kiocb *lookup_kiocb(struct kioctx *ctx, struct iocb __user *iocb,
|
|||
|
||||
assert_spin_locked(&ctx->ctx_lock);
|
||||
|
||||
if (key != KIOCB_KEY)
|
||||
return NULL;
|
||||
|
||||
/* TODO: use a hash or array, this sucks. */
|
||||
list_for_each(pos, &ctx->active_reqs) {
|
||||
struct kiocb *kiocb = list_kiocb(pos);
|
||||
if (kiocb->ki_obj.user == iocb && kiocb->ki_key == key)
|
||||
if (kiocb->ki_obj.user == iocb)
|
||||
return kiocb;
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue