mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
dm cache: simplify the return expression of load_mapping()
Simplify the return expression. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
committed by
Mike Snitzer
parent
52252adede
commit
b77709237e
@@ -2840,7 +2840,6 @@ static void cache_postsuspend(struct dm_target *ti)
|
|||||||
static int load_mapping(void *context, dm_oblock_t oblock, dm_cblock_t cblock,
|
static int load_mapping(void *context, dm_oblock_t oblock, dm_cblock_t cblock,
|
||||||
bool dirty, uint32_t hint, bool hint_valid)
|
bool dirty, uint32_t hint, bool hint_valid)
|
||||||
{
|
{
|
||||||
int r;
|
|
||||||
struct cache *cache = context;
|
struct cache *cache = context;
|
||||||
|
|
||||||
if (dirty) {
|
if (dirty) {
|
||||||
@@ -2849,11 +2848,7 @@ static int load_mapping(void *context, dm_oblock_t oblock, dm_cblock_t cblock,
|
|||||||
} else
|
} else
|
||||||
clear_bit(from_cblock(cblock), cache->dirty_bitset);
|
clear_bit(from_cblock(cblock), cache->dirty_bitset);
|
||||||
|
|
||||||
r = policy_load_mapping(cache->policy, oblock, cblock, dirty, hint, hint_valid);
|
return policy_load_mapping(cache->policy, oblock, cblock, dirty, hint, hint_valid);
|
||||||
if (r)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user