Commit 9e81ab3b authored by Andrew Morton's avatar Andrew Morton Committed by Greg Kroah-Hartman

[PATCH] ext2: update inode ctime on rename()

From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>

Chris Siebenmann posted a fix to update the old inode ctime on rename().

This fix went into 2.2.13, but did not make into 2.4 or 2.6 kernels (the
2.2.13 diff is at the end of this message).

Here is updated 2.6 version without mark_inode_dirty(), which is not
necessary anymore because its called by "ext2_dec_count()" few lines down.
parent b2f1acfe
......@@ -356,6 +356,13 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,
ext2_inc_count(new_dir);
}
/*
* Like most other Unix systems, set the ctime for inodes on a
* rename.
* ext2_dec_count() will mark the inode dirty.
*/
old_inode->i_ctime = CURRENT_TIME;
ext2_delete_entry (old_de, old_page);
ext2_dec_count(old_inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment