From: Brian Behlendorf Date: Tue, 8 Nov 2011 00:25:49 +0000 (-0800) Subject: Disown dataset in zfs_sb_create() X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=591fb62f19ee2431983a4cbeb0d200b1b8e7daf5;p=zfs.git Disown dataset in zfs_sb_create() Fix an unlikely failure cause in zfs_sb_create() which could leave the dataset owned on error and thus unavailable until after a reboot. Disown the dataset if SA are expected but are in fact missing. Signed-off-by: Brian Behlendorf --- diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index b115dcd..ed847f1 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -646,7 +646,7 @@ zfs_sb_create(const char *osname, zfs_sb_t **zsbp) error = zap_lookup(os, MASTER_NODE_OBJ, ZFS_SA_ATTRS, 8, 1, &sa_obj); if (error) - return (error); + goto out; } else { /* * Pre SA versions file systems should never touch