diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2007-09-17 10:59:52 +0100 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-10-10 08:56:24 +0100 |
commit | 16615be18cadf53ee6f8a4f0bdd647f0753421b1 (patch) | |
tree | 670c75e931e6d606211f338ee5e8b1d603c96521 /fs/gfs2/ops_super.c | |
parent | 55c0c4ac0be144014651b19e77c9b77f367955de (diff) | |
download | kernel_samsung_smdk4412-16615be18cadf53ee6f8a4f0bdd647f0753421b1.zip kernel_samsung_smdk4412-16615be18cadf53ee6f8a4f0bdd647f0753421b1.tar.gz kernel_samsung_smdk4412-16615be18cadf53ee6f8a4f0bdd647f0753421b1.tar.bz2 |
[GFS2] Clean up journaled data writing
This patch cleans up the code for writing journaled data into the log.
It also removes the need to allocate a small "tag" structure for each
block written into the log. Instead we just keep count of the outstanding
I/O so that we can be sure that its all been written at the correct time.
Another result of this patch is that a number of ll_rw_block() calls
have become submit_bh() calls, closing some races at the same time.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_super.c')
-rw-r--r-- | fs/gfs2/ops_super.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c index 4316690..950f314 100644 --- a/fs/gfs2/ops_super.c +++ b/fs/gfs2/ops_super.c @@ -455,12 +455,15 @@ static void gfs2_delete_inode(struct inode *inode) } error = gfs2_dinode_dealloc(ip); - /* - * Must do this before unlock to avoid trying to write back - * potentially dirty data now that inode no longer exists - * on disk. - */ + if (error) + goto out_unlock; + + error = gfs2_trans_begin(sdp, 0, sdp->sd_jdesc->jd_blocks); + if (error) + goto out_unlock; + /* Needs to be done before glock release & also in a transaction */ truncate_inode_pages(&inode->i_data, 0); + gfs2_trans_end(sdp); out_unlock: gfs2_glock_dq(&ip->i_iopen_gh); |