summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-05-20 01:26:09 (GMT)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-05-28 06:03:03 (GMT)
commit45856aff0d9091f4836e333951c66eca382a8573 (patch)
treee35d4b4a4b65f3d9453858ffde9602d9dc64791a /fs/f2fs
parent9a55ed656c9afbe41316ab2373bc063359b7683f (diff)
downloadlinux-45856aff0d9091f4836e333951c66eca382a8573.tar.xz
f2fs: fix to unlock page before exit
If we got an error after lock_page, we should unlock it before exit. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/recovery.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index f91ff0f..3a4b51c 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -347,7 +347,7 @@ static int recover_data(struct f2fs_sb_info *sbi,
lock_page(page);
if (cp_ver != cpver_of_node(page))
- goto unlock_out;
+ break;
entry = get_fsync_inode(head, ino_of_node(page));
if (!entry)
@@ -355,7 +355,7 @@ static int recover_data(struct f2fs_sb_info *sbi,
err = do_recover_data(sbi, entry->inode, page, blkaddr);
if (err)
- goto out;
+ break;
if (entry->blkaddr == blkaddr) {
iput(entry->inode);
@@ -366,7 +366,6 @@ next:
/* check next segment */
blkaddr = next_blkaddr_of_node(page);
}
-unlock_out:
unlock_page(page);
out:
__free_pages(page, 0);