diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-21 21:10:10 +0800 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2020-09-29 16:33:12 -0400 |
commit | 7d837c0dd95c4ab34ffec9f61000bb3b384da1a9 (patch) | |
tree | 868b3bd045e1a652b1d62add740f4d5978b2ef0b /drivers/md | |
parent | 399c9bdbd6500254895bdbb574a4acbb860cda41 (diff) |
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) |