diff options
author | Lukas Czerner <lczerner@redhat.com> | 2017-10-17 17:43:09 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-10-17 17:43:09 +0300 |
commit | ffe51f0142a291a957eebb9687cafb15f2b3fc14 (patch) | |
tree | ceaf9afe924903913d20088bdb2065a108481677 /scripts | |
parent | 639812a1ed9bf49ae2c026086fbf975339cd1eef (diff) | |
download | linux-ffe51f0142a291a957eebb9687cafb15f2b3fc14.tar.xz |
fs: Avoid invalidation in interrupt context in dio_complete()
Currently we try to defer completion of async DIO to the process context
in case there are any mapped pages associated with the inode so that we
can invalidate the pages when the IO completes. However the check is racy
and the pages can be mapped afterwards. If this happens we might end up
calling invalidate_inode_pages2_range() in dio_complete() in interrupt
context which could sleep. This can be reproduced by generic/451.
Fix this by passing the information whether we can or can't invalidate
to the dio_complete(). Thanks Eryu Guan for reporting this and Jan Kara
for suggesting a fix.
Fixes: 332391a9935d ("fs: Fix page cache inconsistency when mixing buffered and AIO DIO")
Reported-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Tested-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions