Skip to content
Commit 8fba54ae authored by Miklos Szeredi's avatar Miklos Szeredi
Browse files

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



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>
Cc: <stable@vger.kernel.org> # v4.1+
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>
parent fa8410b3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment