]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
GFS2: put glock reference in error patch of read_rindex_entry
authorBob Peterson <rpeterso@redhat.com>
Thu, 22 Mar 2012 12:58:30 +0000 (08:58 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 2 Apr 2012 11:05:14 +0000 (12:05 +0100)
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>
fs/gfs2/rgrp.c

index 19bde40b4864c6d3faccc0ea513e830dc75f288f..19354a20e5b1e1b90abcfa5854b41b005f516975 100644 (file)
@@ -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);