Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269993
b: refs/heads/master
c: 40ac218
h: refs/heads/master
i:
  269991: bdca5d7
v: v3
  • Loading branch information
Steven Whitehouse committed Oct 21, 2011
1 parent ae8d398 commit 7ea13c3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 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: 1d4ec642d9f00d4c531b1a4ae0613091ec1f8e9b
refs/heads/master: 40ac218f52aa5cac7dc8082f28b61c8b2b29373c
1 change: 1 addition & 0 deletions trunk/fs/gfs2/incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ struct gfs2_alloc {
enum {
GIF_INVALID = 0,
GIF_QD_LOCKED = 1,
GIF_ALLOC_FAILED = 2,
GIF_SW_PAGED = 3,
};

Expand Down
6 changes: 4 additions & 2 deletions trunk/fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,12 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,

fail_gunlock2:
gfs2_glock_dq_uninit(ghs + 1);
if (inode && !IS_ERR(inode))
iput(inode);
fail_gunlock:
gfs2_glock_dq_uninit(ghs);
if (inode && !IS_ERR(inode)) {
set_bit(GIF_ALLOC_FAILED, &GFS2_I(inode)->i_flags);
iput(inode);
}
fail:
if (bh)
brelse(bh);
Expand Down
12 changes: 9 additions & 3 deletions trunk/fs/gfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,9 +1471,11 @@ static void gfs2_evict_inode(struct inode *inode)
goto out;
}

error = gfs2_check_blk_type(sdp, ip->i_no_addr, GFS2_BLKST_UNLINKED);
if (error)
goto out_truncate;
if (!test_bit(GIF_ALLOC_FAILED, &ip->i_flags)) {
error = gfs2_check_blk_type(sdp, ip->i_no_addr, GFS2_BLKST_UNLINKED);
if (error)
goto out_truncate;
}

if (test_bit(GIF_INVALID, &ip->i_flags)) {
error = gfs2_inode_refresh(ip);
Expand Down Expand Up @@ -1513,6 +1515,10 @@ static void gfs2_evict_inode(struct inode *inode)
goto out_unlock;

out_truncate:
gfs2_log_flush(sdp, ip->i_gl);
write_inode_now(inode, 1);
gfs2_ail_flush(ip->i_gl);

/* Case 2 starts here */
error = gfs2_trans_begin(sdp, 0, sdp->sd_jdesc->jd_blocks);
if (error)
Expand Down

0 comments on commit 7ea13c3

Please sign in to comment.