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@d09f25dc66, 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
This commit is contained in:
Andrey Vesnovaty 2013-11-26 16:21:23 +02:00 committed by Brian Behlendorf
parent e2282ef57e
commit 00fcdee1f8

View 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);
}
/*