Commit 8aa6a2a3 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Greg Kroah-Hartman
Browse files

fuse: direct-io: don't dirty ITER_BVEC pages



commit 8fba54ae upstream.

When reading from a loop device backed by a fuse file it deadlocks on
lock_page().

This is because the page is already locked by the read() operation done on
the loop device.  In this case we don't want to either lock the page or
dirty it.

So do what fs/direct-io.c does: only dirty the page for ITER_IOVEC vectors.

Reported-by: default avatarSheng Yang <sheng@yasker.org>
Fixes: aa4d8616 ("block: loop: switch to VFS ITER_BVEC")
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Reviewed-by: default avatarSheng Yang <sheng@yasker.org>
Reviewed-by: default avatarAshish Samant <ashish.samant@oracle.com>
Tested-by: default avatarSheng Yang <sheng@yasker.org>
Tested-by: default avatarAshish Samant <ashish.samant@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5e0286ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment