dm snap persistent: simplify area_io()

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
Qinglang Miao 2020-09-21 21:10:10 +08:00 committed by Mike Snitzer
parent 399c9bdbd6
commit 7d837c0dd9
1 changed files with 2 additions and 9 deletions

View File

@ -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_t chunk = area_location(ps, ps->current_area);
chunk = area_location(ps, ps->current_area);
r = chunk_io(ps, ps->area, chunk, op, op_flags, 0);
if (r)
return r;
return 0;
return chunk_io(ps, ps->area, chunk, op, op_flags, 0);
}
static void zero_memory_area(struct pstore *ps)