Skip to content

Commit d96dad2

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
gfs2: pass sdp to gfs2_write_buf_to_page
This patch passes the superblock pointer to gfs2_write_buf_to_page so it becomes more apparent it's dealing with the system quota file. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent adfd2b5 commit d96dad2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/gfs2/quota.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -729,11 +729,11 @@ static void do_qc(struct gfs2_quota_data *qd, s64 change, int qc_type)
729729
mutex_unlock(&sdp->sd_quota_mutex);
730730
}
731731

732-
static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index,
732+
static int gfs2_write_buf_to_page(struct gfs2_sbd *sdp, unsigned long index,
733733
unsigned off, void *buf, unsigned bytes)
734734
{
735+
struct gfs2_inode *ip = GFS2_I(sdp->sd_quota_inode);
735736
struct inode *inode = &ip->i_inode;
736-
struct gfs2_sbd *sdp = GFS2_SB(inode);
737737
struct address_space *mapping = inode->i_mapping;
738738
struct page *page;
739739
struct buffer_head *bh;
@@ -801,7 +801,6 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index,
801801
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);
805804
unsigned long pg_beg;
806805
unsigned pg_off, nbytes, overflow = 0;
807806
int pg_oflow = 0, error;
@@ -819,11 +818,11 @@ static int gfs2_write_disk_quota(struct gfs2_sbd *sdp, struct gfs2_quota *qp,
819818
}
820819

821820
ptr = qp;
822-
error = gfs2_write_buf_to_page(ip, pg_beg, pg_off, ptr,
821+
error = gfs2_write_buf_to_page(sdp, pg_beg, pg_off, ptr,
823822
nbytes - overflow);
824823
/* If there's an overflow, write the remaining bytes to the next page */
825824
if (!error && pg_oflow)
826-
error = gfs2_write_buf_to_page(ip, pg_beg + 1, 0,
825+
error = gfs2_write_buf_to_page(sdp, pg_beg + 1, 0,
827826
ptr + nbytes - overflow,
828827
overflow);
829828
return error;

0 commit comments

Comments
 (0)