]> Git Repo - linux.git/commit
loop: don't call into filesystem while holding lo_ctl_mutex
authorOmar Sandoval <[email protected]>
Tue, 27 Mar 2018 04:39:11 +0000 (21:39 -0700)
committerJens Axboe <[email protected]>
Tue, 27 Mar 2018 20:21:11 +0000 (14:21 -0600)
commit2d1d4c1e591fd40bd7dafd868a249d7d00e215d5
tree4d4c72ede037788ddc62d5dab7227bb6f4a3b24b
parentbc56e2cafa3f80954a278d74bd18349ac3cb8fa5
loop: don't call into filesystem while holding lo_ctl_mutex

We hit an issue where a loop device on NFS was stuck in
loop_get_status() doing vfs_getattr() after the NFS server died, which
caused a pile-up of uninterruptible processes waiting on lo_ctl_mutex.
There's no reason to hold this lock while we wait on the filesystem;
let's drop it so that other processes can do their thing. We need to
grab a reference on lo_backing_file while we use it, and we can get rid
of the check on lo_device, which has been unnecessary since commit
a34c0ae9ebd6 ("[PATCH] loop: remove the bio remapping capability") in
the linux-history tree.

Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
drivers/block/loop.c
This page took 0.054901 seconds and 4 git commands to generate.