VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Al Viro <viro@zeniv.linux.org.uk> 2011-03-04 01:18:19 -0500 committer: Bob Copeland <me@bobcopeland.com> 2011-03-05 16:23:39 -0500 commit: cdb26496dba00d5c4375261be6518b3e94260444 parent: 013e4f4a285d8c7d952d8d7be9f10783a85b5d3c
Commit Summary:
omfs: stop playing silly buggers with omfs_unlink() in ->rename()
Diffstat:
1 file changed, 3 insertions, 4 deletions
diff --git a/fs/omfs/dir.c b/fs/omfs/dir.c
index 9990fc856959..a4c2d31b785e 100644
--- a/fs/omfs/dir.c
+++ b/fs/omfs/dir.c
@@ -412,12 +412,11 @@ static int omfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 	/* since omfs locates files by name, we need to unlink _before_
 	 * adding the new link or we won't find the old one */
 	inode_inc_link_count(old_inode);
-	err = omfs_unlink(old_dir, old_dentry);
-	if (err) {
-		inode_dec_link_count(old_inode);
+	err = omfs_delete_entry(old_dentry);
+	if (err)
 		goto out;
-	}
 
+	mark_inode_dirty(old_dir);
 	err = omfs_add_link(new_dentry, old_inode);
 	if (err)
 		goto out;