Skip to content

Commit adfd2b5

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
gfs2: pass sdp in to gfs2_write_disk_quota
Like the previous patch, we now pass the superblock pointer to function gfs2_write_disk_quota. This makes the code more understandable, since it only operates on the quota inode. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent ee1768e commit adfd2b5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/gfs2/quota.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,9 +798,10 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index,
798798
return -EIO;
799799
}
800800

801-
static int gfs2_write_disk_quota(struct gfs2_inode *ip, struct gfs2_quota *qp,
801+
static int gfs2_write_disk_quota(struct gfs2_sbd *sdp, struct gfs2_quota *qp,
802802
loff_t loc)
803803
{
804+
struct gfs2_inode *ip = GFS2_I(sdp->sd_quota_inode);
804805
unsigned long pg_beg;
805806
unsigned pg_off, nbytes, overflow = 0;
806807
int pg_oflow = 0, error;
@@ -884,7 +885,7 @@ static int gfs2_adjust_quota(struct gfs2_sbd *sdp, loff_t loc,
884885
}
885886
}
886887

887-
err = gfs2_write_disk_quota(ip, &q, loc);
888+
err = gfs2_write_disk_quota(sdp, &q, loc);
888889
if (!err) {
889890
size = loc + sizeof(struct gfs2_quota);
890891
if (size > inode->i_size)

0 commit comments

Comments
 (0)