From ec1487528bed94c4aaff3687834fe94203880fd6 Mon Sep 17 00:00:00 2001 From: Nathan Straz Date: Tue, 11 Dec 2012 17:01:24 -0500 Subject: [PATCH] GFS2: Initialize hex string to '0' When generating the DLM lock name, a value of 0 would skip the loop and leave the string unchanged. This left locks with a value of 0 unlabeled. Initializing the string to '0' fixes this. Signed-off-by: Nathan Straz Signed-off-by: Steven Whitehouse --- fs/gfs2/lock_dlm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 8dad6b093716..b906ed17a839 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c @@ -241,6 +241,7 @@ static u32 make_flags(struct gfs2_glock *gl, const unsigned int gfs_flags, static void gfs2_reverse_hex(char *c, u64 value) { + *c = '0'; while (value) { *c-- = hex_asc[value & 0x0f]; value >>= 4; -- 2.20.1