Commit ecbd3a63 authored by Peter Staubach's avatar Peter Staubach Committed by Linus Torvalds

[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: default avatarPeter Staubach <staubach@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e8c3b5a6
...@@ -137,6 +137,7 @@ static int ramfs_symlink(struct inode * dir, struct dentry *dentry, const char * ...@@ -137,6 +137,7 @@ static int ramfs_symlink(struct inode * dir, struct dentry *dentry, const char *
inode->i_gid = dir->i_gid; inode->i_gid = dir->i_gid;
d_instantiate(dentry, inode); d_instantiate(dentry, inode);
dget(dentry); dget(dentry);
dir->i_mtime = dir->i_ctime = CURRENT_TIME;
} else } else
iput(inode); iput(inode);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment