diff options
author | Nathan Straz <nstraz@redhat.com> | 2012-12-11 23:01:24 +0100 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2013-01-02 11:04:00 +0100 |
commit | ec1487528bed94c4aaff3687834fe94203880fd6 (patch) | |
tree | 596a9a256e1465b3baf3ee882a6a06c1d2311f34 /fs/gfs2 | |
parent | Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux (diff) | |
download | linux-ec1487528bed94c4aaff3687834fe94203880fd6.tar.xz linux-ec1487528bed94c4aaff3687834fe94203880fd6.zip |
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>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/lock_dlm.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |