Skip to content

Commit

Permalink
Fix in check_filesystem()
Browse files Browse the repository at this point in the history
Fix the code in case of missing snapshots. Previously the check was in
a conditional that would be executed if the filesystem had snapshots.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tino Reichardt <[email protected]>
Signed-off-by: George Amanakis <[email protected]>
Closes #14735
  • Loading branch information
gamanakis authored Apr 12, 2023
1 parent 678a3b8 commit 574e09d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions module/zfs/spa_errlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,12 @@ check_filesystem(spa_t *spa, uint64_t head_ds, zbookmark_err_phys_t *zep,
dsl_dataset_rele(ds, FTAG);
return (error);
}
}

if (snap_count == 0) {
/* Filesystem without snapshots. */
dsl_dataset_rele(ds, FTAG);
return (0);
}
if (snap_count == 0) {
/* Filesystem without snapshots. */
dsl_dataset_rele(ds, FTAG);
return (0);
}

uint64_t *snap_obj_array = kmem_zalloc(snap_count * sizeof (uint64_t),
Expand Down

0 comments on commit 574e09d

Please sign in to comment.