From b5b24d7aeb9608935786369ac2d3e9f362877d55 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 7 Sep 2011 10:33:25 +0100 Subject: GFS2: Fix AIL flush issue during fsync Unfortunately, it is not enough to just ignore locked buffers during the AIL flush from fsync. We need to be able to ignore all buffers which are locked, dirty or pinned at this stage as they might have been added subsequent to the log flush earlier in the fsync function. In addition, this means that we no longer need to rely on i_mutex to keep out writes during fsync, so we can, as a side-effect, remove that protection too. Signed-off-by: Steven Whitehouse Tested-By: Abhijith Das --- fs/gfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/gfs2/super.c') diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 87e9141a4def..71e420989f77 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -1533,7 +1533,7 @@ static void gfs2_evict_inode(struct inode *inode) out_truncate: gfs2_log_flush(sdp, ip->i_gl); write_inode_now(inode, 1); - gfs2_ail_flush(ip->i_gl); + gfs2_ail_flush(ip->i_gl, 0); /* Case 2 starts here */ error = gfs2_trans_begin(sdp, 0, sdp->sd_jdesc->jd_blocks); -- cgit v1.2.3