Skip to content

Commit

Permalink
dm snap persistent: simplify area_io()
Browse files Browse the repository at this point in the history
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Qinglang Miao authored and Mike Snitzer committed Sep 29, 2020
1 parent 399c9bd commit 7d837c0
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions drivers/md/dm-snap-persistent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7d837c0

Please sign in to comment.