commit 6d225a4a1e13c36389d33241a110f4ab3ecdd0eb
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date: Tue Mar 13 13:22:52 2007 -0400
purge dir cache bug
diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c
index 7305fd5..14d513e 100644
--- a/fs/unionfs/unlink.c
+++ b/fs/unionfs/unlink.c
@@ -61,16 +61,17 @@ static int unionfs_do_unlink(struct inode *dir, struct
dentry *dentry)
err = odf_create_wh(dentry);
if (err)
goto out;
- /* we want to update mtime here, since if the file to
- * be removed was only on a rd only branch, then since
- * the mtime of that branch has not changed, so the
- * mtime of the upper file is not updated
- */
- odf_purge_dir_cache(dentry->d_parent);
- attr.ia_mtime = current_kernel_time();
- attr.ia_valid = ATTR_MTIME | ATTR_MTIME_SET | ATTR_FORCE;
- err = notify_change(dentry->d_parent, &attr);
}
+
+ /* we want to update mtime here, since if the file to
+ * be removed was only on a rd only branch, then since
+ * the mtime of that branch has not changed, so the
+ * mtime of the upper file is not updated
+ */
+ odf_purge_dir_cache(dentry->d_parent);
+ attr.ia_mtime = current_kernel_time();
+ attr.ia_valid = ATTR_MTIME | ATTR_MTIME_SET | ATTR_FORCE;
+ err = notify_change(dentry->d_parent, &attr);
out:
if (!err)
@@ -154,16 +155,17 @@ static int unionfs_do_rmdir(struct inode *dir, struct
dentry *dentry)
err = odf_create_wh(dentry);
if (err)
goto out;
- /* we want to update mtime here, since if the file to
- * be removed was only on a rd only branch, then since
- * the mtime of that branch has not changed, so the
- * mtime of the upper file is not updated
- */
- odf_purge_dir_cache(dentry->d_parent);
- attr.ia_mtime = current_kernel_time();
- attr.ia_valid = ATTR_MTIME | ATTR_MTIME_SET | ATTR_FORCE;
- err = notify_change(dentry->d_parent, &attr);
}
+
+ /* we want to update mtime here, since if the file to
+ * be removed was only on a rd only branch, then since
+ * the mtime of that branch has not changed, so the
+ * mtime of the upper file is not updated
+ */
+ odf_purge_dir_cache(dentry->d_parent);
+ attr.ia_mtime = current_kernel_time();
+ attr.ia_valid = ATTR_MTIME | ATTR_MTIME_SET | ATTR_FORCE;
+ err = notify_change(dentry->d_parent, &attr);
out:
return err;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs