cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] GFS2: Initialize hex string to '0'
@ 2012-12-11 22:01 Nathan Straz
  2012-12-13 10:59 ` Steven Whitehouse
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Straz @ 2012-12-11 22:01 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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.
---
 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 0fb6539..a924b6a 100644
--- a/fs/gfs2/lock_dlm.c
+++ b/fs/gfs2/lock_dlm.c
@@ -239,6 +239,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;
-- 
1.7.11.7



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-13 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 22:01 [Cluster-devel] [PATCH] GFS2: Initialize hex string to '0' Nathan Straz
2012-12-13 10:59 ` Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).