File btrfs-progs-convert-remove-redundant-check.patch of Package btrfsprogs.5036

From: David Sterba <dsterba@suse.com>
Subject: btrfs-progs: convert: remove redundant check
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
Git-commit: 7cad06d9709462ae548e99173666bf52b3095e3c
Patch-mainline: v4.7.1

The check for sectorsize is properly done in do_convert, remove the
BUG_ON.

Signed-off-by: David Sterba <dsterba@suse.com>
Acked-by: Jeff Mahoney <jeffm@suse.com>
---
 btrfs-convert.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/btrfs-convert.c b/btrfs-convert.c
index d2ff5177..cf2701ad 100644
--- a/btrfs-convert.c
+++ b/btrfs-convert.c
@@ -1359,7 +1359,6 @@ static int migrate_super_block(int fd, u64 old_bytenr, u32 sectorsize)
 	u32 len;
 	u32 bytenr;
 
-	BUG_ON(sectorsize < sizeof(*super));
 	buf = malloc(sizeof(*buf) + sectorsize);
 	if (!buf)
 		return -ENOMEM;

openSUSE Build Service is sponsored by