From 94b25662c51696ec081494e69efb5896566dede2 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bubała Date: Thu, 6 Jul 2017 17:38:24 +0200 Subject: Reschedule processes on -ERESTARTSYS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- module/zfs/zvol.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/zfs/zvol.c') 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)); } -- cgit v1.2.3