From 00fcdee1f88f5f1413913f26ebd1cc43107e82e0 Mon Sep 17 00:00:00 2001 From: Andrey Vesnovaty Date: Tue, 26 Nov 2013 16:21:23 +0200 Subject: [PATCH] Fix regression introduced in port of Illumos #3744 Remove the redundant call to zfs_unmount_snap() which was being done after char array was freed, This fixes an upstream regression that was introduced in commit zfsonlinux/zfs@d09f25dc66774959499a89bf3680d09c6e541ce8, which ported the Illumos 3744 changes. Signed-off-by: Andrey Vesnovaty Signed-off-by: Brian Behlendorf Signed-off-by: Richard Yao Closes #2156 --- module/zfs/zfs_ioctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index a061978dc..5951bc673 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -3494,11 +3494,13 @@ recursive_unmount(const char *fsname, void *arg) { const char *snapname = arg; char *fullname; + int error; fullname = kmem_asprintf("%s@%s", fsname, snapname); - zfs_unmount_snap(fullname); + error = zfs_unmount_snap(fullname); strfree(fullname); - return (zfs_unmount_snap(fullname)); + + return (error); } /* -- 2.40.0