Skip to content

Commit c1499a0

Browse files
z00467499snitm
authored andcommitted
dm space map common: remove check for impossible sm_find_free() return value
The function sm_find_free() just returns -ENOSPC and 0. So remove lone caller's check for some other error. Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent bcd6765 commit c1499a0

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/md/persistent-data/dm-space-map-common.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,6 @@ int sm_ll_find_free_block(struct ll_disk *ll, dm_block_t begin,
369369
*/
370370
dm_tm_unlock(ll->tm, blk);
371371
continue;
372-
373-
} else if (r < 0) {
374-
dm_tm_unlock(ll->tm, blk);
375-
return r;
376372
}
377373

378374
dm_tm_unlock(ll->tm, blk);

0 commit comments

Comments
 (0)