From: Arkadiusz Bubała Date: Thu, 6 Jul 2017 15:38:24 +0000 (+0200) Subject: Reschedule processes on -ERESTARTSYS X-Git-Tag: zfs-0.7.0-rc5~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94b25662c51696ec081494e69efb5896566dede2;p=zfs 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 Reviewed-by: George Melikov Signed-off-by: Arkadiusz Bubała Closes #6283 Closes #6312 --- 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)); }