summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/f2fs/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 29f73fdf958e..575adac17f8b 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -228,14 +228,14 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
if (!de)
goto fail;
+ f2fs_lock_op(sbi);
err = acquire_orphan_inode(sbi);
if (err) {
+ f2fs_unlock_op(sbi);
kunmap(page);
f2fs_put_page(page, 0);
goto fail;
}
-
- f2fs_lock_op(sbi);
f2fs_delete_entry(de, page, inode);
f2fs_unlock_op(sbi);