mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-26 23:43:09 +00:00
Btrfs-progs: fix an off-by-one in write_dev_supers()
Fix an off-by-one in write_dev_supers(). Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
This commit is contained in:
parent
db1b7f93b4
commit
5f3ab71103
@ -998,7 +998,7 @@ int write_dev_supers(struct btrfs_root *root, struct btrfs_super_block *sb,
|
||||
|
||||
for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) {
|
||||
bytenr = btrfs_sb_offset(i);
|
||||
if (bytenr + BTRFS_SUPER_INFO_SIZE >= device->total_bytes)
|
||||
if (bytenr + BTRFS_SUPER_INFO_SIZE > device->total_bytes)
|
||||
break;
|
||||
|
||||
btrfs_set_super_bytenr(sb, bytenr);
|
||||
|
Loading…
Reference in New Issue
Block a user