diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-21 15:10:10 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2020-09-29 22:33:12 +0200 |
commit | 7d837c0dd95c4ab34ffec9f61000bb3b384da1a9 (patch) | |
tree | 868b3bd045e1a652b1d62add740f4d5978b2ef0b /drivers/md | |
parent | dm thin metadata: Remove unused local variable when create thin and snap (diff) | |
download | linux-7d837c0dd95c4ab34ffec9f61000bb3b384da1a9.tar.xz linux-7d837c0dd95c4ab34ffec9f61000bb3b384da1a9.zip |
dm snap persistent: simplify area_io()
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-snap-persistent.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index 63fab7c769be..8e329c3f3a78 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c @@ -284,16 +284,9 @@ static void skip_metadata(struct pstore *ps) */ static int area_io(struct pstore *ps, int op, int op_flags) { - int r; - chunk_t chunk; - - chunk = area_location(ps, ps->current_area); - - r = chunk_io(ps, ps->area, chunk, op, op_flags, 0); - if (r) - return r; + chunk_t chunk = area_location(ps, ps->current_area); - return 0; + return chunk_io(ps, ps->area, chunk, op, op_flags, 0); } static void zero_memory_area(struct pstore *ps) |