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 <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Arkadiusz Bubała <arkadiusz.bubala@open-e.com> Closes #6283 Closes #6312
This commit is contained in:
parent
9c3dcab5e2
commit
94b25662c5
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue