aio: hold an extra file reference over AIO read/write operations
authorChristoph Hellwig <hch@lst.de>
Sun, 30 Oct 2016 16:42:01 +0000 (11:42 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 30 Oct 2016 17:09:42 +0000 (13:09 -0400)
commit0b944d3a4bba6b25f43aed530f4fa85c04d162a6
treec5c7b8fc2ec3fe80e12de1e3a8bdb65aa04b2169
parenta909d3e636995ba7c349e2ca5dbb528154d4ac30
aio: hold an extra file reference over AIO read/write operations

Otherwise we might dereference an already freed file and/or inode
when aio_complete is called before we return from the read_iter or
write_iter method.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/aio.c