aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/quota.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2018-06-04 08:50:16 -0400
committerBob Peterson <rpeterso@redhat.com>2018-06-04 08:50:16 -0400
commit845802b112eeedfa32b2ebba694996a49677596e (patch)
treee0f4d8f2ad943c67d9e050845cc8c198018f765d /fs/gfs2/quota.c
parentd6382a3505d289ec2df55a822f1fd72d9a72d256 (diff)
gfs2: Remove ordered write mode handling from gfs2_trans_add_data
In journaled data mode, we need to add each buffer head to the current transaction. In ordered write mode, we only need to add the inode to the ordered inode list. So far, both cases are handled in gfs2_trans_add_data. This makes the code look misleading and is inefficient for small block sizes as well. Handle both cases separately instead. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r--fs/gfs2/quota.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 7a98abd340ee..e8585dfd209f 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -735,7 +735,10 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index,
735 if (!buffer_uptodate(bh)) 735 if (!buffer_uptodate(bh))
736 goto unlock_out; 736 goto unlock_out;
737 } 737 }
738 gfs2_trans_add_data(ip->i_gl, bh); 738 if (gfs2_is_jdata(ip))
739 gfs2_trans_add_data(ip->i_gl, bh);
740 else
741 gfs2_ordered_add_inode(ip);
739 742
740 /* If we need to write to the next block as well */ 743 /* If we need to write to the next block as well */
741 if (to_write > (bsize - boff)) { 744 if (to_write > (bsize - boff)) {