提交 db34be19 编写于 作者: L Liu Bo 提交者: David Sterba

Btrfs: remove redundant check in rbio_can_merge

Given the above
'
if (last->operation != cur->operation)
	return 0;
',
it's guaranteed that two operations are same.
Signed-off-by: NLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 05a5c55d
......@@ -594,12 +594,10 @@ static int rbio_can_merge(struct btrfs_raid_bio *last,
* bio list here, anyone else that wants to
* change this stripe needs to do their own rmw.
*/
if (last->operation == BTRFS_RBIO_PARITY_SCRUB ||
cur->operation == BTRFS_RBIO_PARITY_SCRUB)
if (last->operation == BTRFS_RBIO_PARITY_SCRUB)
return 0;
if (last->operation == BTRFS_RBIO_REBUILD_MISSING ||
cur->operation == BTRFS_RBIO_REBUILD_MISSING)
if (last->operation == BTRFS_RBIO_REBUILD_MISSING)
return 0;
return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册