]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: direct-io: don't dirty ITER_BVEC pages
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 24 Aug 2016 16:17:04 +0000 (18:17 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 24 Aug 2016 16:17:04 +0000 (18:17 +0200)
commita8f8578053fa333016843d4f3986d7e12c13d7f4
treefca6bcc907a272cd72bf952778467a5ad4428a6a
parent5aae0ef8ecd1e0f786f43df45a48d7babf83a452
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: Sheng Yang <sheng@yasker.org>
Fixes: 8aba3f92527b ("block: loop: switch to VFS ITER_BVEC")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org> # v4.1+
Reviewed-by: Sheng Yang <sheng@yasker.org>
Reviewed-by: Ashish Samant <ashish.samant@oracle.com>
Tested-by: Sheng Yang <sheng@yasker.org>
Tested-by: Ashish Samant <ashish.samant@oracle.com>
fs/fuse/file.c