Skip to content

Commit

Permalink
[GFS2] Use const on glock lookup key
Browse files Browse the repository at this point in the history
Use const for the glock name which is being used as a lookup key
in the glock hash table.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Steven Whitehouse committed Aug 30, 2006
1 parent ec45d9f commit d6a5372
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static inline int relaxed_state_ok(unsigned int actual, unsigned requested,
* Returns: The number of the corresponding hash bucket
*/

static unsigned int gl_hash(struct lm_lockname *name)
static unsigned int gl_hash(const struct lm_lockname *name)
{
unsigned int h;

Expand Down Expand Up @@ -200,7 +200,7 @@ static inline int queue_empty(struct gfs2_glock *gl, struct list_head *head)
*/

static struct gfs2_glock *search_bucket(struct gfs2_gl_hash_bucket *bucket,
struct lm_lockname *name)
const struct lm_lockname *name)
{
struct gfs2_glock *gl;

Expand All @@ -227,7 +227,7 @@ static struct gfs2_glock *search_bucket(struct gfs2_gl_hash_bucket *bucket,
*/

static struct gfs2_glock *gfs2_glock_find(struct gfs2_sbd *sdp,
struct lm_lockname *name)
const struct lm_lockname *name)
{
struct gfs2_gl_hash_bucket *bucket = &sdp->sd_gl_hash[gl_hash(name)];
struct gfs2_glock *gl;
Expand Down

0 comments on commit d6a5372

Please sign in to comment.