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

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: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent ee1768e4
...@@ -798,9 +798,10 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index, ...@@ -798,9 +798,10 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index,
return -EIO; return -EIO;
} }
static int gfs2_write_disk_quota(struct gfs2_inode *ip, 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;
...@@ -884,7 +885,7 @@ static int gfs2_adjust_quota(struct gfs2_sbd *sdp, loff_t loc, ...@@ -884,7 +885,7 @@ static int gfs2_adjust_quota(struct gfs2_sbd *sdp, loff_t loc,
} }
} }
err = gfs2_write_disk_quota(ip, &q, loc); err = gfs2_write_disk_quota(sdp, &q, loc);
if (!err) { if (!err) {
size = loc + sizeof(struct gfs2_quota); size = loc + sizeof(struct gfs2_quota);
if (size > inode->i_size) if (size > inode->i_size)
......
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