Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1401151 > unrolled thread

bfs: rename should update ctime and mtime

Started bySalah Triki <salah.triki@acm.org>
First post2016-05-16 04:10 +0200
Last post2016-05-16 04:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  bfs: rename should update ctime and mtime Salah Triki <salah.triki@acm.org> - 2016-05-16 04:10 +0200

#1401151 — bfs: rename should update ctime and mtime

FromSalah Triki <salah.triki@acm.org>
Date2016-05-16 04:10 +0200
Subjectbfs: rename should update ctime and mtime
Message-ID<rzg8O-u7-11@gated-at.bofh.it>
bfs_rename should update ctime and mtime on target, and mark the target
as dirty.

Signed-off-by: Salah Triki <salah.triki@acm.org>
---
 fs/bfs/dir.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index 3ec6113..da30bb7 100644
--- a/fs/bfs/dir.c
+++ b/fs/bfs/dir.c
@@ -254,6 +254,8 @@ 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_inode_dirty(new_dir);
 	}
 	mark_buffer_dirty_inode(old_bh, old_dir);
 	error = 0;
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web