aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_address.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/ops_address.c')
-rw-r--r--fs/gfs2/ops_address.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 37406a379e7a..38dbe99a30ed 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -646,7 +646,6 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
646 if (error) 646 if (error)
647 goto out_unlock; 647 goto out_unlock;
648 648
649 ip->i_alloc.al_requested = 0;
650 if (alloc_required) { 649 if (alloc_required) {
651 al = gfs2_alloc_get(ip); 650 al = gfs2_alloc_get(ip);
652 651
@@ -823,7 +822,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,
823 struct gfs2_inode *ip = GFS2_I(inode); 822 struct gfs2_inode *ip = GFS2_I(inode);
824 struct gfs2_sbd *sdp = GFS2_SB(inode); 823 struct gfs2_sbd *sdp = GFS2_SB(inode);
825 struct buffer_head *dibh; 824 struct buffer_head *dibh;
826 struct gfs2_alloc *al = &ip->i_alloc; 825 struct gfs2_alloc *al = ip->i_alloc;
827 struct gfs2_dinode *di; 826 struct gfs2_dinode *di;
828 unsigned int from = pos & (PAGE_CACHE_SIZE - 1); 827 unsigned int from = pos & (PAGE_CACHE_SIZE - 1);
829 unsigned int to = from + len; 828 unsigned int to = from + len;
@@ -861,7 +860,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,
861 brelse(dibh); 860 brelse(dibh);
862 gfs2_trans_end(sdp); 861 gfs2_trans_end(sdp);
863failed: 862failed:
864 if (al->al_requested) { 863 if (al) {
865 gfs2_inplace_release(ip); 864 gfs2_inplace_release(ip);
866 gfs2_quota_unlock(ip); 865 gfs2_quota_unlock(ip);
867 gfs2_alloc_put(ip); 866 gfs2_alloc_put(ip);