Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38858
b: refs/heads/master
c: dc41aee
h: refs/heads/master
v: v3
  • Loading branch information
Russell Cattelan authored and Steven Whitehouse committed Sep 18, 2006
1 parent 81674fd commit e75cdb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a6bbacbb8dec6fbd1242c959250388f907d429e
refs/heads/master: dc41aeedef6b776583064be8abe6813159b4901d
7 changes: 5 additions & 2 deletions trunk/fs/gfs2/ops_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,16 @@ static int gfs2_readpage(struct file *file, struct page *page)
{
struct gfs2_inode *ip = GFS2_I(page->mapping->host);
struct gfs2_sbd *sdp = GFS2_SB(page->mapping->host);
struct gfs2_file *gf = NULL;
struct gfs2_holder gh;
int error;
int do_unlock = 0;

if (likely(file != &gfs2_internal_file_sentinel)) {
if (file) {
struct gfs2_file *gf = file->private_data;
gf = file->private_data;
if (test_bit(GFF_EXLOCK, &gf->f_flags))
/* gfs2_sharewrite_nopage has grabbed the ip->i_gl already */
goto skip_lock;
}
gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME|GL_AOP, &gh);
Expand All @@ -245,7 +247,8 @@ static int gfs2_readpage(struct file *file, struct page *page)
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
error = -EIO;

if (file != &gfs2_internal_file_sentinel) {
if (gf && !test_bit(GFF_EXLOCK, &gf->f_flags) &&
file != &gfs2_internal_file_sentinel) {
gfs2_glock_dq_m(1, &gh);
gfs2_holder_uninit(&gh);
}
Expand Down

0 comments on commit e75cdb2

Please sign in to comment.