diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2012-10-31 17:56:56 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-01-22 12:31:41 +0100 |
commit | 5f3ab71103eb9554f61b526b0eaa250d4b1aca11 (patch) | |
tree | eddce07e292f78e893ce76db84add8f9869ec149 | |
parent | db1b7f93b4818028d915ac3c98c0f621103bd3ba (diff) |
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>
-rw-r--r-- | disk-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |