summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Brown <zab@redhat.com>2013-08-14 16:16:40 -0700
committerDavid Sterba <dsterba@suse.cz>2013-09-03 19:41:07 +0200
commit66253a818362601c00c4b98715bd819940075937 (patch)
tree43c842de072e498f10fd49c1715d270318ac45e7
parent73043664dc8a48d329881632d33dd9eae6bd060a (diff)
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>
-rw-r--r--qgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qgroup.c b/qgroup.c
index 038c4dca..86fe2b23 100644
--- a/qgroup.c
+++ b/qgroup.c
@@ -74,7 +74,7 @@ qgroup_inherit_realloc(struct btrfs_qgroup_inherit **inherit, int n, int pos)
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;