commit e1c68193bea048235f7a3e42932b0d673307b19b
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Nov 29 02:36:57 2007 -0500
Unionfs ODF: cleanup code in odf_create_hierarchy
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index baed380..bd09433 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -53,35 +53,30 @@ int __odf_create_hierarchy(struct dentry *odf_root)
dentry = __odf_create_dir(odf_root, ODF_NS);
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
- dentry = NULL;
goto out;
}
dput(dentry);
dentry = __odf_create_dir(odf_root, ODF_IC);
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
- dentry = NULL;
goto out;
}
dput(dentry);
dentry = __odf_create_dir(odf_root, ODF_RC);
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
- dentry = NULL;
goto out;
}
dput(dentry);
dentry = __odf_create_dir(odf_root, ODF_SR);
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
- dentry = NULL;
goto out;
}
dput(dentry);
dentry = lookup_one_len(ODF_WH, odf_root, sizeof(ODF_WH) - 1);
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
- dentry = NULL;
goto out;
}
if (unlikely(dentry->d_inode)) {
@@ -95,7 +90,8 @@ int __odf_create_hierarchy(struct dentry *odf_root)
release_lower_nd(&lower_nd, err);
out:
- dput(dentry);
+ if (!err)
+ dput(dentry);
return err;
}
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs