lkml.org 
[lkml]   [2016]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V3] bfs: rename should update mtime
Date
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
\
 
 \ /
  Last update: 2016-05-15 22:01    [W:0.025 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site