aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/quota.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r--fs/gfs2/quota.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index fe1828ffebfa..bc9ad058d20e 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -248,11 +248,9 @@ static int bh_get(struct gfs2_quota_data *qd)
248 struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; 248 struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;
249 struct gfs2_inode *ip = GFS2_I(sdp->sd_qc_inode); 249 struct gfs2_inode *ip = GFS2_I(sdp->sd_qc_inode);
250 unsigned int block, offset; 250 unsigned int block, offset;
251 u64 dblock;
252 int new = 0;
253 struct buffer_head *bh; 251 struct buffer_head *bh;
254 int error; 252 int error;
255 int boundary; 253 struct buffer_head bh_map;
256 254
257 mutex_lock(&sdp->sd_quota_mutex); 255 mutex_lock(&sdp->sd_quota_mutex);
258 256
@@ -264,10 +262,10 @@ static int bh_get(struct gfs2_quota_data *qd)
264 block = qd->qd_slot / sdp->sd_qc_per_block; 262 block = qd->qd_slot / sdp->sd_qc_per_block;
265 offset = qd->qd_slot % sdp->sd_qc_per_block;; 263 offset = qd->qd_slot % sdp->sd_qc_per_block;;
266 264
267 error = gfs2_block_map(&ip->i_inode, block, &new, &dblock, &boundary); 265 error = gfs2_block_map(&ip->i_inode, block, 0, &bh_map, 1);
268 if (error) 266 if (error)
269 goto fail; 267 goto fail;
270 error = gfs2_meta_read(ip->i_gl, dblock, DIO_START | DIO_WAIT, &bh); 268 error = gfs2_meta_read(ip->i_gl, bh_map.b_blocknr, DIO_START | DIO_WAIT, &bh);
271 if (error) 269 if (error)
272 goto fail; 270 goto fail;
273 error = -EIO; 271 error = -EIO;