Skip to content

Commit

Permalink
GFS2: put glock reference in error patch of read_rindex_entry
Browse files Browse the repository at this point in the history
This patch fixes the error path of function read_rindex_entry
so that it correctly gives up its glock reference in cases where
there is a race to re-read the rindex after gfs2_grow.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Mar 26, 2012
1 parent e22057c commit c1ac539
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ static int read_rindex_entry(struct gfs2_inode *ip,
return 0;

error = 0; /* someone else read in the rgrp; free it and ignore it */
gfs2_glock_put(rgd->rd_gl);

fail:
kfree(rgd->rd_bits);
Expand Down

0 comments on commit c1ac539

Please sign in to comment.