Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28ea06c4 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Bob Peterson
Browse files

gfs2: Avoid alignment hole in struct lm_lockname



Commit 88ffbf3e switches to using rhashtables for glocks, hashing over
the entire struct lm_lockname instead of its individual fields.  On some
architectures, struct lm_lockname contains a hole of uninitialized
memory due to alignment rules, which now leads to incorrect hash values.
Get rid of that hole.

Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
CC: <stable@vger.kernel.org> #v4.3+
parent ae50dfd6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ struct lm_lockname {
	struct gfs2_sbd *ln_sbd;
	u64 ln_number;
	unsigned int ln_type;
};
} __packed __aligned(sizeof(int));

#define lm_name_equal(name1, name2) \
        (((name1)->ln_number == (name2)->ln_number) &&	\