aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/omfs/dir.c7
1 files 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,
412 /* since omfs locates files by name, we need to unlink _before_ 412 /* since omfs locates files by name, we need to unlink _before_
413 * adding the new link or we won't find the old one */ 413 * adding the new link or we won't find the old one */
414 inode_inc_link_count(old_inode); 414 inode_inc_link_count(old_inode);
415 err = omfs_unlink(old_dir, old_dentry); 415 err = omfs_delete_entry(old_dentry);
416 if (err) { 416 if (err)
417 inode_dec_link_count(old_inode);
418 goto out; 417 goto out;
419 }
420 418
419 mark_inode_dirty(old_dir);
421 err = omfs_add_link(new_dentry, old_inode); 420 err = omfs_add_link(new_dentry, old_inode);
422 if (err) 421 if (err)
423 goto out; 422 goto out;