Skip to content

Commit 3932e50

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
gfs2: Remove quota allocation info from quota file
Function do_sync called gfs2_qa_get and put for quota allocation data. But the inode in question is the system master quota file, which is never subject to quotas. Therefore, a qa structure should be unnecessary and if anything accesses it, it's probably a bug. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent c9ff3c6 commit 3932e50

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

fs/gfs2/quota.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -905,18 +905,12 @@ static int do_sync(unsigned int num_qd, struct gfs2_quota_data **qda)
905905
unsigned int nalloc = 0, blocks;
906906
int error;
907907

908-
error = gfs2_qa_get(ip);
909-
if (error)
910-
return error;
911-
912908
gfs2_write_calc_reserv(ip, sizeof(struct gfs2_quota),
913909
&data_blocks, &ind_blocks);
914910

915911
ghs = kmalloc_array(num_qd, sizeof(struct gfs2_holder), GFP_NOFS);
916-
if (!ghs) {
917-
error = -ENOMEM;
918-
goto out;
919-
}
912+
if (!ghs)
913+
return -ENOMEM;
920914

921915
sort(qda, num_qd, sizeof(struct gfs2_quota_data *), sort_qd, NULL);
922916
inode_lock(&ip->i_inode);
@@ -989,8 +983,6 @@ static int do_sync(unsigned int num_qd, struct gfs2_quota_data **qda)
989983
kfree(ghs);
990984
gfs2_log_flush(ip->i_gl->gl_name.ln_sbd, ip->i_gl,
991985
GFS2_LOG_HEAD_FLUSH_NORMAL | GFS2_LFC_DO_SYNC);
992-
out:
993-
gfs2_qa_put(ip);
994986
if (!error) {
995987
for (x = 0; x < num_qd; x++)
996988
qda[x]->qd_sync_gen = sdp->sd_quota_sync_gen;

0 commit comments

Comments
 (0)