Skip to content

Commit

Permalink
GFS2: Initialize hex string to '0'
Browse files Browse the repository at this point in the history
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 <nstraz@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Nathan Straz authored and Steven Whitehouse committed Jan 2, 2013
1 parent 4a490b7 commit ec14875
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/gfs2/lock_dlm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ec14875

Please sign in to comment.