Skip to contentSkip to conversation

bfs: rename should update mtime

PATCH Superseded Salah Triki 1 participant 1 message Apr 25, 2016

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 bfs: rename should update mtime

bfs_rename should update ctime and mtime on target.

---
 fs/bfs/dir.c | 1 +
 1 file changed, 1 insertion(+)
fs/bfs/dir.c +1 -0
index 3ec6113..c69f7dc 100644
@@ -254,6 +254,7 @@ static int bfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 	if (new_inode) {
 		new_inode->i_ctime = CURRENT_TIME_SEC;
 		inode_dec_link_count(new_inode);
+		new_dir->i_ctime = new_dir->i_mtime = CURRENT_TIME_SEC;
 	}
 	mark_buffer_dirty_inode(old_bh, old_dir);
 	error = 0;
Signature · 1 line
1.9.1