]> granicus.if.org Git - zfs/commitdiff
Fix regression introduced in port of Illumos #3744
authorAndrey Vesnovaty <andrey.vesnovaty@gmail.com>
Tue, 26 Nov 2013 14:21:23 +0000 (16:21 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 20 Mar 2014 18:00:48 +0000 (11:00 -0700)
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 <andrey.vesnovaty@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Closes #2156

module/zfs/zfs_ioctl.c

index a061978dcee8907cf8b11b2a60db9c5187f07df4..5951bc673cb30be75c4070cf05ccaafee3733e66 100644 (file)
@@ -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);
 }
 
 /*