Skip to contentSkip to conversation

GFS2: put glock reference in error patch of read_rindex_entry

PATCH New Bob Peterson 2 participants 2 messages Mar 22, 2012 – Mar 23, 2012 1 message not in the archive GFS2 file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 0c6956ff-6872-4b92-8ba8-c0b94006adbb@zmail12.collab.prod.int.phx2.redhat.com

#1 lore raw

PATCH 1/1 GFS2: put glock reference in error patch of read_rindex_entry

Hi,

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.

Regards,

Bob Peterson
Red Hat File Systems

---

fs/gfs2/rgrp.c +1 -0
index 19bde40..19354a2 100644
@@ -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);
#2 lore raw

PATCH 1/1 GFS2: put glock reference in error patch of read_rindex_entry

Hi,

Quoted 8 lines · Bob Peterson

Hi,

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.

Regards,

I'll add this to the -fixes tree shortly,

Steve.

Quoted 18 lines

Bob Peterson
Red Hat File Systems

---

fs/gfs2/rgrp.c +1 -0
index 19bde40..19354a2 100644
@@ -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);