Commit d96dad27 authored by Bob Peterson's avatar Bob Peterson Committed by Andreas Gruenbacher

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: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent adfd2b5e
...@@ -729,11 +729,11 @@ static void do_qc(struct gfs2_quota_data *qd, s64 change, int qc_type) ...@@ -729,11 +729,11 @@ static void do_qc(struct gfs2_quota_data *qd, s64 change, int qc_type)
mutex_unlock(&sdp->sd_quota_mutex); mutex_unlock(&sdp->sd_quota_mutex);
} }
static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index, static int gfs2_write_buf_to_page(struct gfs2_sbd *sdp, unsigned long index,
unsigned off, void *buf, unsigned bytes) unsigned off, void *buf, unsigned bytes)
{ {
struct gfs2_inode *ip = GFS2_I(sdp->sd_quota_inode);
struct inode *inode = &ip->i_inode; struct inode *inode = &ip->i_inode;
struct gfs2_sbd *sdp = GFS2_SB(inode);
struct address_space *mapping = inode->i_mapping; struct address_space *mapping = inode->i_mapping;
struct page *page; struct page *page;
struct buffer_head *bh; struct buffer_head *bh;
...@@ -801,7 +801,6 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index, ...@@ -801,7 +801,6 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index,
static int gfs2_write_disk_quota(struct gfs2_sbd *sdp, struct gfs2_quota *qp, static int gfs2_write_disk_quota(struct gfs2_sbd *sdp, struct gfs2_quota *qp,
loff_t loc) loff_t loc)
{ {
struct gfs2_inode *ip = GFS2_I(sdp->sd_quota_inode);
unsigned long pg_beg; unsigned long pg_beg;
unsigned pg_off, nbytes, overflow = 0; unsigned pg_off, nbytes, overflow = 0;
int pg_oflow = 0, error; int pg_oflow = 0, error;
...@@ -819,11 +818,11 @@ static int gfs2_write_disk_quota(struct gfs2_sbd *sdp, struct gfs2_quota *qp, ...@@ -819,11 +818,11 @@ static int gfs2_write_disk_quota(struct gfs2_sbd *sdp, struct gfs2_quota *qp,
} }
ptr = qp; ptr = qp;
error = gfs2_write_buf_to_page(ip, pg_beg, pg_off, ptr, error = gfs2_write_buf_to_page(sdp, pg_beg, pg_off, ptr,
nbytes - overflow); nbytes - overflow);
/* If there's an overflow, write the remaining bytes to the next page */ /* If there's an overflow, write the remaining bytes to the next page */
if (!error && pg_oflow) if (!error && pg_oflow)
error = gfs2_write_buf_to_page(ip, pg_beg + 1, 0, error = gfs2_write_buf_to_page(sdp, pg_beg + 1, 0,
ptr + nbytes - overflow, ptr + nbytes - overflow,
overflow); overflow);
return error; return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment