GIT: unionfs2-2.6.27.y: Unionfs: bugfix: don't call branchget() until dentry_open succeeded
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:16:47 EDT 2010
commit a7c80e99a8532ca03029414e3d7021a03ac76c37
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date: Mon Jul 16 23:56:26 2007 -0400
Unionfs: bugfix: don't call branchget() until dentry_open succeeded
If dentry_open fails, we incorrectly have incremented our branch counts
which would prevent unionfs from being unmounted (EBUSY).
Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index 46e5008..42678a6 100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -216,7 +216,6 @@ static int open_highest_file(struct file *file, int willwrite)
dget(lower_dentry);
unionfs_mntget(dentry, bstart);
- branchget(sb, bstart);
lower_file = dentry_open(lower_dentry,
unionfs_lower_mnt_idx(dentry, bstart),
file->f_flags);
@@ -224,6 +223,7 @@ static int open_highest_file(struct file *file, int willwrite)
err = PTR_ERR(lower_file);
goto out;
}
+ branchget(sb, bstart);
unionfs_set_lower_file(file, lower_file);
/* Fix up the position. */
lower_file->f_pos = file->f_pos;
More information about the unionfs-cvs
mailing list