summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2013-05-07 16:19:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-07 19:41:50 -0700
commit8a6608907cf165b3ae658c9de2efe6af4be68bff (patch)
treebb2bee9e1c77576ead3d904fdd409ff355a7a867 /include
parent4e23bcaeb9e8df234e47840ac2c757ab79a0b572 (diff)
downloadlinux-stable-8a6608907cf165b3ae658c9de2efe6af4be68bff.tar.gz
linux-stable-8a6608907cf165b3ae658c9de2efe6af4be68bff.tar.bz2
linux-stable-8a6608907cf165b3ae658c9de2efe6af4be68bff.zip
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 'include')
-rw-r--r--include/linux/aio.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h
index f0a8481af99b..7308836dd045 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -12,7 +12,7 @@
struct kioctx;
struct kiocb;
-#define KIOCB_SYNC_KEY (~0U)
+#define KIOCB_KEY 0
/*
* We use ki_cancel == KIOCB_CANCELLED to indicate that a kiocb has been either
@@ -56,10 +56,9 @@ typedef int (kiocb_cancel_fn)(struct kiocb *, struct io_event *);
*/
struct kiocb {
atomic_t ki_users;
- unsigned ki_key; /* id of this request */
struct file *ki_filp;
- struct kioctx *ki_ctx; /* may be NULL for sync ops */
+ struct kioctx *ki_ctx; /* NULL for sync ops */
kiocb_cancel_fn *ki_cancel;
ssize_t (*ki_retry)(struct kiocb *);
void (*ki_dtor)(struct kiocb *);
@@ -95,14 +94,14 @@ struct kiocb {
static inline bool is_sync_kiocb(struct kiocb *kiocb)
{
- return kiocb->ki_key == KIOCB_SYNC_KEY;
+ return kiocb->ki_ctx == NULL;
}
static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp)
{
*kiocb = (struct kiocb) {
.ki_users = ATOMIC_INIT(1),
- .ki_key = KIOCB_SYNC_KEY,
+ .ki_ctx = NULL,
.ki_filp = filp,
.ki_obj.tsk = current,
};