commit 6070bc5de1247f61d38b9c207060cb2af2bce71f
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date: Wed May 30 19:18:45 2007 -0400
only free odf in unionfs_read_super after odf_put_super succeeds
diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
index 77c1f9e..c6e5a02 100644
--- a/fs/unionfs/main.c
+++ b/fs/unionfs/main.c
@@ -633,7 +633,7 @@ static int unionfs_read_super(struct super_block *sb, void
*raw_data,
printk(KERN_WARNING "unionfs_read_super: could not load
options from odf\n");
err = PTR_ERR(odf_options);
odf_options = NULL;
- goto out_free;
+ goto out_free_odf;
}
raw_data = odf_options;
}
@@ -645,11 +645,11 @@ static int unionfs_read_super(struct super_block *sb,
void *raw_data,
"(err = %ld)\n", PTR_ERR(hidden_root_info));
err = PTR_ERR(hidden_root_info);
hidden_root_info = NULL;
- goto out_free;
+ goto out_free_odf;
}
if (hidden_root_info->bstart == -1) {
err = -ENOENT;
- goto out_free;
+ goto out_free_odf;
}
/* if odf is new, save branch conf */
@@ -660,13 +660,13 @@ static int unionfs_read_super(struct super_block *sb,
void *raw_data,
hidden_root_info->lower_paths,
hidden_root_info->bend -
hidden_root_info->bstart + 1);
if (err)
- goto out_free;
+ goto out_free_odf;
err = odf_write_sb_data(odf,UNIONFS_SB(sb)->data,
hidden_root_info->lower_paths,
hidden_root_info->bend -
hidden_root_info->bstart + 1);
if (err)
- goto out_free;
+ goto out_free_odf;
}
/* set the hidden superblock field of upper superblock */
@@ -776,13 +776,14 @@ out_dput:
hidden_root_info = NULL;
}
-out_free:
+out_free_odf:
/* cleanup thread is not started,free it here so
* odf_put_super doesnt wait for it */
kfree(UNIONFS_SB(sb)->odf.cleanup);
UNIONFS_SB(sb)->odf.cleanup = NULL;
odf_put_super(&UNIONFS_SB(sb)->odf);
+out_free:
kfree(UNIONFS_SB(sb)->data);
kfree(UNIONFS_SB(sb));
sb->s_fs_info = NULL;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs