aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorArkadiusz Bubała <[email protected]>2017-07-06 17:38:24 +0200
committerBrian Behlendorf <[email protected]>2017-07-06 08:38:24 -0700
commit94b25662c51696ec081494e69efb5896566dede2 (patch)
tree741d3a4cfa91aac34c8fe4a29a483b38987e6008 /module
parent9c3dcab5e229723ba41c67926223e942794a9ab2 (diff)
Reschedule processes on -ERESTARTSYS
On the single core machine the system may hang when the spa_namespare_lock acquisition fails in the zvol_first_open function. It returns -ERESTARTSYS error what causes the endless loop in __blkdev_get function. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Arkadiusz Bubała <[email protected]> Closes #6283 Closes #6312
Diffstat (limited to 'module')
-rw-r--r--module/zfs/zvol.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
index 3e9f004ef..4f1601ec6 100644
--- a/module/zfs/zvol.c
+++ b/module/zfs/zvol.c
@@ -1358,6 +1358,8 @@ out_mutex:
mutex_exit(&zv->zv_state_lock);
if (drop_suspend)
rw_exit(&zv->zv_suspend_lock);
+ if (error == -ERESTARTSYS)
+ schedule();
return (SET_ERROR(error));
}