Skip to contentSkip to conversation

dm space map common: remove the redundancy check for the sm_find_free's return value

PATCH New ZhangXiaoxu 1 participant 1 message Jun 9, 2019 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dm space map common: remove the redundancy check for the sm_find_free's return value

The function sm_find_free just return -ENOSPC and 0. So, remove the redundancy check.

---
 drivers/md/persistent-data/dm-space-map-common.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/md/persistent-data/dm-space-map-common.c +0 -4
index b8a6218..bd68f6f 100644
@@ -369,10 +369,6 @@ int sm_ll_find_free_block(struct ll_disk *ll, dm_block_t begin,
 			 */
 			dm_tm_unlock(ll->tm, blk);
 			continue;
-
-		} else if (r < 0) {
-			dm_tm_unlock(ll->tm, blk);
-			return r;
 		}
 
 		dm_tm_unlock(ll->tm, blk);
Signature · 1 line
2.7.4