diff options
author | Christoph Hellwig <hch@lst.de> | 2015-02-02 14:49:06 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-13 12:10:27 -0400 |
commit | 04b2fa9f8f36ec6fb6fd1c9dc9df6fff0cd27323 (patch) | |
tree | f9fdc8004b4decca27e30da1614529eaf1455136 /fs/fuse/file.c | |
parent | 599bd19bdc4c6b20fd91d50f2f79dececbaf80c1 (diff) | |
download | linux-04b2fa9f8f36ec6fb6fd1c9dc9df6fff0cd27323.tar.bz2 |
fs: split generic and aio kiocb
Most callers in the kernel want to perform synchronous file I/O, but
still have to bloat the stack with a full struct kiocb. Split out
the parts needed in filesystem code from those in the aio code, and
only allocate those needed to pass down argument on the stack. The
aio code embedds the generic iocb in the one it allocates and can
easily get back to it by using container_of.
Also add a ->ki_complete method to struct kiocb, this is used to call
into the aio code and thus removes the dependency on aio for filesystems
impementing asynchronous operations. It will also allow other callers
to substitute their own completion callback.
We also add a new ->ki_flags field to work around the nasty layering
violation recently introduced in commit 5e33f6 ("usb: gadget: ffs: add
eventfd notification about ffs events").
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r-- | fs/fuse/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index f81d83eb9758..a5c5e38b3ff8 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -584,7 +584,7 @@ static void fuse_aio_complete(struct fuse_io_priv *io, int err, ssize_t pos) spin_unlock(&fc->lock); } - aio_complete(io->iocb, res, 0); + io->iocb->ki_complete(io->iocb, res, 0); kfree(io); } } |