On 10/17/2017 04:44 AM, Lukas Czerner wrote: > > On Tue, Oct 17, 2017 at 11:53:56AM +0200, Jan Kara wrote: >> On Tue 17-10-17 11:11:24, Lukas Czerner wrote: >>> 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") >>> Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx> >>> Reported-by: Eryu Guan <eguan@xxxxxxxxxx> >> >> Looks good to me. You can add: >> >> Reviewed-by: Jan Kara <jack@xxxxxxx> >> >> BTW, I guess you should CC someone who can merge the patch... > > Jens, could you please take this through your tree ? Will do, queued it up for 4.14. -- Jens Axboe