Commit 013e4f4a authored by Al Viro's avatar Al Viro Committed by Bob Copeland

omfs: rename() needs to mark old_inode dirty after ctime update

we *do* mark it dirty before, but it doesn't guarantee that we
don't get preempted just before assignment to ->i_ctime, with
inode getting written out before we get CPU back...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
parent 85e2efbb
...@@ -423,6 +423,7 @@ static int omfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -423,6 +423,7 @@ static int omfs_rename(struct inode *old_dir, struct dentry *old_dentry,
goto out; goto out;
old_inode->i_ctime = CURRENT_TIME_SEC; old_inode->i_ctime = CURRENT_TIME_SEC;
mark_inode_dirty(old_inode);
out: out:
return err; return err;
} }
......
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