diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-13 06:46:26 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-13 06:46:26 +0100 |
| commit | 568bfce07873fb07086ca239c0e321ef5d8088f1 (patch) | |
| tree | bf41ec01d950558ba0931be12668712de084c6cb /drivers/md/persistent-data/dm-array.c | |
| parent | serial: 8250: Revert "drop lockdep annotation from serial8250_clear_IER()" (diff) | |
| parent | Linux 6.13-rc7 (diff) | |
| download | linux-568bfce07873fb07086ca239c0e321ef5d8088f1.tar.gz linux-568bfce07873fb07086ca239c0e321ef5d8088f1.zip | |
Merge 6.13-rc7 into tty-next
We need the serial driver fixes in here to build on top of.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md/persistent-data/dm-array.c')
| -rw-r--r-- | drivers/md/persistent-data/dm-array.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/md/persistent-data/dm-array.c b/drivers/md/persistent-data/dm-array.c index 157c9bd2fed7..8f8792e55806 100644 --- a/drivers/md/persistent-data/dm-array.c +++ b/drivers/md/persistent-data/dm-array.c @@ -917,23 +917,27 @@ static int load_ablock(struct dm_array_cursor *c) if (c->block) unlock_ablock(c->info, c->block); - c->block = NULL; - c->ab = NULL; c->index = 0; r = dm_btree_cursor_get_value(&c->cursor, &key, &value_le); if (r) { DMERR("dm_btree_cursor_get_value failed"); - dm_btree_cursor_end(&c->cursor); + goto out; } else { r = get_ablock(c->info, le64_to_cpu(value_le), &c->block, &c->ab); if (r) { DMERR("get_ablock failed"); - dm_btree_cursor_end(&c->cursor); + goto out; } } + return 0; + +out: + dm_btree_cursor_end(&c->cursor); + c->block = NULL; + c->ab = NULL; return r; } @@ -956,10 +960,10 @@ EXPORT_SYMBOL_GPL(dm_array_cursor_begin); void dm_array_cursor_end(struct dm_array_cursor *c) { - if (c->block) { + if (c->block) unlock_ablock(c->info, c->block); - dm_btree_cursor_end(&c->cursor); - } + + dm_btree_cursor_end(&c->cursor); } EXPORT_SYMBOL_GPL(dm_array_cursor_end); @@ -999,6 +1003,7 @@ int dm_array_cursor_skip(struct dm_array_cursor *c, uint32_t count) } count -= remaining; + c->index += (remaining - 1); r = dm_array_cursor_next(c); } while (!r); |
