mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 21:53:44 +00:00
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 <nstraz@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
parent
4a490b78cb
commit
ec1487528b
@ -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)
|
static void gfs2_reverse_hex(char *c, u64 value)
|
||||||
{
|
{
|
||||||
|
*c = '0';
|
||||||
while (value) {
|
while (value) {
|
||||||
*c-- = hex_asc[value & 0x0f];
|
*c-- = hex_asc[value & 0x0f];
|
||||||
value >>= 4;
|
value >>= 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user