]> git.baikalelectronics.ru Git - kernel.git/commit
aio: add a iocb refcount
authorChristoph Hellwig <hch@lst.de>
Tue, 24 Jul 2018 09:36:37 +0000 (11:36 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 6 Aug 2018 08:24:28 +0000 (10:24 +0200)
commit85463279355fdb43e4c0f98eb530872f88b7e55b
tree5a1f3fea68ac2e1c2aabc0d1c42bf73b32785014
parent33f446ebc042efbb12677aa96abd9ee7bccf3457
aio: add a iocb refcount

This is needed to prevent races caused by the way the ->poll API works.
To avoid introducing overhead for other users of the iocbs we initialize
it to zero and only do refcount operations if it is non-zero in the
completion path.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Avi Kivity <avi@scylladb.com>
fs/aio.c