All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3] bfs: rename should update mtime
@ 2016-05-15 19:36 Salah Triki
  0 siblings, 0 replies; only message in thread
From: Salah Triki @ 2016-05-15 19:36 UTC (permalink / raw)
  To: tigran; +Cc: salah.triki, linux-kernel

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-15 19:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-15 19:36 [PATCH V3] bfs: rename should update mtime Salah Triki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.