summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_rename.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-06-27 13:34:26 +1000
committerNiv Sardi <xaiki@debian.org>2008-07-28 16:59:14 +1000
commit8f8670bb1cfa177d35c54e4cc96152dc425a7ab3 (patch)
tree677c7b6801ac0b1307966df96470aa27cee78441 /fs/xfs/xfs_rename.c
parent313b5c767a044c7a0db5e773cb7aea70383b2627 (diff)
[XFS] Don't update mtime on rename source
As reported by Michael-John Turner XFS updates the mtime on the source inode of a rename call in case it's a directory and changes the parent. This doesn't make any sense, is not mentioned in the standards and not performed by any other Linux filesystems so remove it. SGI-PV: 983684 SGI-Modid: xfs-linux-melb:xfs-kern:31364a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Barry Naujok <bnaujok@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_rename.c')
-rw-r--r--fs/xfs/xfs_rename.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c
index d8063e1ad298..d700dacdb10e 100644
--- a/fs/xfs/xfs_rename.c
+++ b/fs/xfs/xfs_rename.c
@@ -336,22 +336,18 @@ xfs_rename(
ASSERT(error != EEXIST);
if (error)
goto abort_return;
- xfs_ichgtime(src_ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
-
- } else {
- /*
- * We always want to hit the ctime on the source inode.
- * We do it in the if clause above for the 'new_parent &&
- * src_is_directory' case, and here we get all the other
- * cases. This isn't strictly required by the standards
- * since the source inode isn't really being changed,
- * but old unix file systems did it and some incremental
- * backup programs won't work without it.
- */
- xfs_ichgtime(src_ip, XFS_ICHGTIME_CHG);
}
/*
+ * We always want to hit the ctime on the source inode.
+ *
+ * This isn't strictly required by the standards since the source
+ * inode isn't really being changed, but old unix file systems did
+ * it and some incremental backup programs won't work without it.
+ */
+ xfs_ichgtime(src_ip, XFS_ICHGTIME_CHG);
+
+ /*
* Adjust the link count on src_dp. This is necessary when
* renaming a directory, either within one parent when
* the target existed, or across two parent directories.