Btrfs-progs: fix a regression in mkfs.btrfs

Commit 55061a98 adds a cut & paste error that makes mkfs.btrfs fail
if leafsize != sectorsize.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Reviewed-by: Filipe Manana <fdmanana@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
Stefan Behrens 2013-08-08 12:51:39 +02:00 committed by David Sterba
parent 989ca65a11
commit 116123c5f2
1 changed files with 1 additions and 1 deletions

View File

@ -430,7 +430,7 @@ int make_btrfs(int fd, const char *device, const char *label,
ret = pwrite(fd, buf->data, sectorsize, blocks[0]);
if (ret < 0)
return -errno;
else if (ret != leafsize)
else if (ret != sectorsize)
return -EIO;
free(buf);