Skip to content

Commit

Permalink
omfs: rename() needs to mark old_inode dirty after ctime update
Browse files Browse the repository at this point in the history
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: Al Viro <[email protected]>
Signed-off-by: Bob Copeland <[email protected]>
  • Loading branch information
Al Viro authored and bcopeland committed Mar 5, 2011
1 parent 85e2efb commit 013e4f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/omfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ static int omfs_rename(struct inode *old_dir, struct dentry *old_dentry,
goto out;

old_inode->i_ctime = CURRENT_TIME_SEC;
mark_inode_dirty(old_inode);
out:
return err;
}
Expand Down

0 comments on commit 013e4f4

Please sign in to comment.