瀏覽代碼

[PATCH] ramfs needs to update directory m/ctime on symlink

ramfs neglects to update the directory mtime and ctime fields when creating
a new symbolic link.  Ramfs was modified in 2.6.15 to update these fields
when other types of entries are created.  The symlink support is separate
from that other support, so that change did not cover quite all of the
possibilities.

All of the directory content manipulation entry points now seem to be
covered with respect to these time field updates.

Signed-off-by: Peter Staubach <staubach@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Peter Staubach 19 年之前
父節點
當前提交
ecbd3a632c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/ramfs/inode.c

+ 1 - 0
fs/ramfs/inode.c

@@ -137,6 +137,7 @@ static int ramfs_symlink(struct inode * dir, struct dentry *dentry, const char *
 				inode->i_gid = dir->i_gid;
 			d_instantiate(dentry, inode);
 			dget(dentry);
+			dir->i_mtime = dir->i_ctime = CURRENT_TIME;
 		} else
 			iput(inode);
 	}