summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-09-25 17:54:56 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2015-10-09 16:20:54 -0700
commit7223554133c3f72809ea6ddbf0d8464e7c70c1b1 (patch)
treefbdd0a51ee8bb37be5dcff367436ccb6bd9860fd /fs/f2fs/recovery.c
parent1d7e10d58a1f62c8c44668cca1cff6a2dd57d7d9 (diff)
downloadlinux-7223554133c3f72809ea6ddbf0d8464e7c70c1b1.tar.gz
linux-7223554133c3f72809ea6ddbf0d8464e7c70c1b1.tar.bz2
linux-7223554133c3f72809ea6ddbf0d8464e7c70c1b1.zip
f2fs: remove unneeded f2fs_{,un}lock_op in do_recover_data()
Protecting recovery flow by using cp_rwsem is not needed, since we have prevent triggering any checkpoint by locking cp_mutex previously. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index acc21f20637b..c5daec503e7f 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -383,15 +383,11 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
start = start_bidx_of_node(ofs_of_node(page), fi);
end = start + ADDRS_PER_PAGE(page, fi);
- f2fs_lock_op(sbi);
-
set_new_dnode(&dn, inode, NULL, NULL, 0);
err = get_dnode_of_data(&dn, start, ALLOC_NODE);
- if (err) {
- f2fs_unlock_op(sbi);
+ if (err)
goto out;
- }
f2fs_wait_on_page_writeback(dn.node_page, NODE);
@@ -456,7 +452,6 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
set_page_dirty(dn.node_page);
err:
f2fs_put_dnode(&dn);
- f2fs_unlock_op(sbi);
out:
f2fs_msg(sbi->sb, KERN_NOTICE,
"recover_data: ino = %lx, recovered = %d blocks, err = %d",