Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45856aff authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: fix to unlock page before exit



If we got an error after lock_page, we should unlock it before exit.

Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 9a55ed65
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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 @@ static int recover_data(struct f2fs_sb_info *sbi,
		/* check next segment */
		blkaddr = next_blkaddr_of_node(page);
	}
unlock_out:
	unlock_page(page);
out:
	__free_pages(page, 0);