btrfsprogs/0056-btrfs-progs-fix-qgroup-realloc-inheritance.patch
Tomáš Chvátal 5be20c4ea7 Accepting request 205320 from home:dsterba:branches:filesystems
SR: a few fixes, aimed for 13.1 RC2

- fsck updates
- more mkfs sanity checks
- qgroup rescan wait

OBS-URL: https://build.opensuse.org/request/show/205320
OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=144
2013-10-31 09:12:04 +00:00

37 lines
1.2 KiB
Diff

From 85a8cc9ecfb9b61c5feaaf3ba861f27a2501691d Mon Sep 17 00:00:00 2001
From: Zach Brown <zab@redhat.com>
Date: Wed, 14 Aug 2013 16:16:40 -0700
Subject: [PATCH 56/62] btrfs-progs: fix qgroup realloc inheritance
qgroup.c:82:23: warning: memcpy with byte count of 0
qgroup.c:83:23: warning: memcpy with byte count of 0
The inheritance wasn't copying qgroups[] because a confused sizeof()
gave 0 byte memcpy()s. It's been like this for the year since it was
merged, so I guess this isn't a very important thing to do :).
Signed-off-by: Zach Brown <zab@redhat.com>
Reviewed-by: Arne Jansen <sensille@gmx.net>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
---
qgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qgroup.c b/qgroup.c
index dafde12becf6..e860b309e77c 100644
--- a/qgroup.c
+++ b/qgroup.c
@@ -74,7 +74,7 @@ int qgroup_inherit_realloc(struct btrfs_qgroup_inherit **inherit, int n,
if (*inherit) {
struct btrfs_qgroup_inherit *i = *inherit;
- int s = sizeof(out->qgroups);
+ int s = sizeof(out->qgroups[0]);
out->num_qgroups = i->num_qgroups;
out->num_ref_copies = i->num_ref_copies;
--
1.8.3.1