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

Commit 29013c40 authored by Sayali Lokhande's avatar Sayali Lokhande Committed by Gerrit - the friendly Code Review server
Browse files

Revert "f2fs: Avoid double lock for cp_rwsem during checkpoint"



This reverts commit b508af62.

Change-Id: Iacc35548db93e159e9bb87bfca1d572825e7813b
Signed-off-by: default avatarSayali Lokhande <sayalil@codeaurora.org>
parent 1526c9c6
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1216,19 +1216,21 @@ static int block_operations(struct f2fs_sb_info *sbi)
		goto retry_flush_quotas;
	}

retry_flush_nodes:
	down_write(&sbi->node_write);

	if (get_pages(sbi, F2FS_DIRTY_NODES)) {
		up_write(&sbi->node_write);
		up_write(&sbi->node_change);
		f2fs_unlock_all(sbi);
		atomic_inc(&sbi->wb_sync_req[NODE]);
		err = f2fs_sync_node_pages(sbi, &wbc, false, FS_CP_NODE_IO);
		atomic_dec(&sbi->wb_sync_req[NODE]);
		if (err)
		if (err) {
			up_write(&sbi->node_change);
			f2fs_unlock_all(sbi);
			goto out;
		}
		cond_resched();
		goto retry_flush_quotas;
		goto retry_flush_nodes;
	}

	/*