Skip to content

Commit b777092

Browse files
Zheng Yongjunsnitm
authored andcommitted
dm cache: simplify the return expression of load_mapping()
Simplify the return expression. Signed-off-by: Zheng Yongjun <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent 52252ad commit b777092

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/md/dm-cache-target.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2840,7 +2840,6 @@ static void cache_postsuspend(struct dm_target *ti)
28402840
static int load_mapping(void *context, dm_oblock_t oblock, dm_cblock_t cblock,
28412841
bool dirty, uint32_t hint, bool hint_valid)
28422842
{
2843-
int r;
28442843
struct cache *cache = context;
28452844

28462845
if (dirty) {
@@ -2849,11 +2848,7 @@ static int load_mapping(void *context, dm_oblock_t oblock, dm_cblock_t cblock,
28492848
} else
28502849
clear_bit(from_cblock(cblock), cache->dirty_bitset);
28512850

2852-
r = policy_load_mapping(cache->policy, oblock, cblock, dirty, hint, hint_valid);
2853-
if (r)
2854-
return r;
2855-
2856-
return 0;
2851+
return policy_load_mapping(cache->policy, oblock, cblock, dirty, hint, hint_valid);
28572852
}
28582853

28592854
/*

0 commit comments

Comments
 (0)