From 591fb62f19ee2431983a4cbeb0d200b1b8e7daf5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 7 Nov 2011 16:25:49 -0800 Subject: [PATCH] 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 --- module/zfs/zfs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 1.8.3.1