commit 05d4abc0889be1e9e92cee2fdce075afe7001f4b
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date: Fri Nov 16 13:47:00 2007 -0500
Unionfs: branch-management bugfix to unionfs_file_revalidate
If we re-opened the file on a different branch than the original one, and
only if this was due to a new branch inserted, then update the mnt counts of
the old and new branches accordingly.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index 28518e1..3e65637 100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -437,11 +437,12 @@ int unionfs_file_revalidate(struct file *file, int
willwrite)
goto out;
new_brid = UNIONFS_F(file)->
saved_branch_ids[fbstart(file)];
- if (new_brid != orig_brid) {
+ if (new_brid != orig_brid && sbgen > fgen) {
/*
* If we re-opened the file on a different
- * branch than the original one, then update
- * the mnt counts of the old and new
+ * branch than the original one, and this
+ * was due to a new branch inserted, then
+ * update the mnt counts of the old and new
* branches accordingly.
*/
unionfs_mntget(dentry, bstart); /* new branch */
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs