All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm space map common: remove the redundancy check for the sm_find_free's return value
@ 2019-06-09  7:25 ZhangXiaoxu
  0 siblings, 0 replies; only message in thread
From: ZhangXiaoxu @ 2019-06-09  7:25 UTC (permalink / raw)
  To: dm-devel, agk, snitzer, zhangxiaoxu5

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

Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
---
 drivers/md/persistent-data/dm-space-map-common.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/md/persistent-data/dm-space-map-common.c b/drivers/md/persistent-data/dm-space-map-common.c
index b8a6218..9b7ff2a 100644
--- a/drivers/md/persistent-data/dm-space-map-common.c
+++ b/drivers/md/persistent-data/dm-space-map-common.c
@@ -370,9 +370,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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-09  7:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-09  7:25 [PATCH] dm space map common: remove the redundancy check for the sm_find_free's return value ZhangXiaoxu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.