diff options
author | Ned Bass <[email protected]> | 2013-01-09 15:46:31 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-01-09 16:54:52 -0800 |
commit | 761394b3af152895ac68a970a91a4f8a917c547b (patch) | |
tree | 150fc317c9f41c6a3870072fbe2b3428a0874e8e /module/zfs/vdev_disk.c | |
parent | 1c50c992bafd96773dc3950d382a89806df8cc9c (diff) |
call_usermodehelper() should wait for process
As of Linux 3.4 the UMH_WAIT_* constants were renumbered. In
particular, the meaning of "1" changed from UMH_WAIT_PROC (wait for
process to complete), to UMH_WAIT_EXEC (wait for the exec, but not the
process). A number of call sites used the number 1 instead of the
constant name, so the behavior was not as expected on kernels with this
change.
One visible consequence of this change was that processes accessing
automounted snapshots received an ELOOP error because they failed to
wait for zfs.mount to complete.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #816
Diffstat (limited to 'module/zfs/vdev_disk.c')
-rw-r--r-- | module/zfs/vdev_disk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c index 3f9b624d8..cbf0a4d4f 100644 --- a/module/zfs/vdev_disk.c +++ b/module/zfs/vdev_disk.c @@ -159,7 +159,7 @@ vdev_elevator_switch(vdev_t *v, char *elevator) char *envp[] = { NULL }; argv[2] = kmem_asprintf(SET_SCHEDULER_CMD, device, elevator); - error = call_usermodehelper(argv[0], argv, envp, 1); + error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); strfree(argv[2]); } #endif /* HAVE_ELEVATOR_CHANGE */ |