diff options
author | Kent Overstreet <koverstreet@google.com> | 2013-05-07 19:19:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 22:41:50 -0400 |
commit | 8a6608907cf165b3ae658c9de2efe6af4be68bff (patch) | |
tree | bb2bee9e1c77576ead3d904fdd409ff355a7a867 /fs/aio.c | |
parent | 4e23bcaeb9e8df234e47840ac2c757ab79a0b572 (diff) |
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 <koverstreet@google.com>
Cc: Zach Brown <zab@redhat.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Asai Thambi S P <asamymuthupa@micron.com>
Cc: Selvan Mani <smani@micron.com>
Cc: Sam Bradshaw <sbradshaw@micron.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Reviewed-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1159,7 +1159,7 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, | |||
1159 | } | 1159 | } |
1160 | } | 1160 | } |
1161 | 1161 | ||
1162 | ret = put_user(req->ki_key, &user_iocb->aio_key); | 1162 | ret = put_user(KIOCB_KEY, &user_iocb->aio_key); |
1163 | if (unlikely(ret)) { | 1163 | if (unlikely(ret)) { |
1164 | pr_debug("EFAULT: aio_key\n"); | 1164 | pr_debug("EFAULT: aio_key\n"); |
1165 | goto out_put_req; | 1165 | goto out_put_req; |
@@ -1281,10 +1281,13 @@ static struct kiocb *lookup_kiocb(struct kioctx *ctx, struct iocb __user *iocb, | |||
1281 | 1281 | ||
1282 | assert_spin_locked(&ctx->ctx_lock); | 1282 | assert_spin_locked(&ctx->ctx_lock); |
1283 | 1283 | ||
1284 | if (key != KIOCB_KEY) | ||
1285 | return NULL; | ||
1286 | |||
1284 | /* TODO: use a hash or array, this sucks. */ | 1287 | /* TODO: use a hash or array, this sucks. */ |
1285 | list_for_each(pos, &ctx->active_reqs) { | 1288 | list_for_each(pos, &ctx->active_reqs) { |
1286 | struct kiocb *kiocb = list_kiocb(pos); | 1289 | struct kiocb *kiocb = list_kiocb(pos); |
1287 | if (kiocb->ki_obj.user == iocb && kiocb->ki_key == key) | 1290 | if (kiocb->ki_obj.user == iocb) |
1288 | return kiocb; | 1291 | return kiocb; |
1289 | } | 1292 | } |
1290 | return NULL; | 1293 | return NULL; |