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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 7b5573946f19..c0352cf330a3 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -251,10 +251,10 @@ static int bh_get(struct gfs2_quota_data *qd)
251 struct buffer_head *bh; 251 struct buffer_head *bh;
252 int error; 252 int error;
253 253
254 down(&sdp->sd_quota_mutex); 254 mutex_lock(&sdp->sd_quota_mutex);
255 255
256 if (qd->qd_bh_count++) { 256 if (qd->qd_bh_count++) {
257 up(&sdp->sd_quota_mutex); 257 mutex_unlock(&sdp->sd_quota_mutex);
258 return 0; 258 return 0;
259 } 259 }
260 260
@@ -276,7 +276,7 @@ static int bh_get(struct gfs2_quota_data *qd)
276 (bh->b_data + sizeof(struct gfs2_meta_header) + 276 (bh->b_data + sizeof(struct gfs2_meta_header) +
277 offset * sizeof(struct gfs2_quota_change)); 277 offset * sizeof(struct gfs2_quota_change));
278 278
279 up(&sdp->sd_quota_mutex); 279 mutex_lock(&sdp->sd_quota_mutex);
280 280
281 return 0; 281 return 0;
282 282
@@ -285,7 +285,7 @@ static int bh_get(struct gfs2_quota_data *qd)
285 285
286 fail: 286 fail:
287 qd->qd_bh_count--; 287 qd->qd_bh_count--;
288 up(&sdp->sd_quota_mutex); 288 mutex_unlock(&sdp->sd_quota_mutex);
289 return error; 289 return error;
290} 290}
291 291
@@ -293,14 +293,14 @@ static void bh_put(struct gfs2_quota_data *qd)
293{ 293{
294 struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; 294 struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;
295 295
296 down(&sdp->sd_quota_mutex); 296 mutex_lock(&sdp->sd_quota_mutex);
297 gfs2_assert(sdp, qd->qd_bh_count); 297 gfs2_assert(sdp, qd->qd_bh_count);
298 if (!--qd->qd_bh_count) { 298 if (!--qd->qd_bh_count) {
299 brelse(qd->qd_bh); 299 brelse(qd->qd_bh);
300 qd->qd_bh = NULL; 300 qd->qd_bh = NULL;
301 qd->qd_bh_qc = NULL; 301 qd->qd_bh_qc = NULL;
302 } 302 }
303 up(&sdp->sd_quota_mutex); 303 mutex_unlock(&sdp->sd_quota_mutex);
304} 304}
305 305
306static int qd_fish(struct gfs2_sbd *sdp, struct gfs2_quota_data **qdp) 306static int qd_fish(struct gfs2_sbd *sdp, struct gfs2_quota_data **qdp)
@@ -529,7 +529,7 @@ static void do_qc(struct gfs2_quota_data *qd, int64_t change)
529 struct gfs2_quota_change *qc = qd->qd_bh_qc; 529 struct gfs2_quota_change *qc = qd->qd_bh_qc;
530 int64_t x; 530 int64_t x;
531 531
532 down(&sdp->sd_quota_mutex); 532 mutex_lock(&sdp->sd_quota_mutex);
533 gfs2_trans_add_bh(ip->i_gl, qd->qd_bh, 1); 533 gfs2_trans_add_bh(ip->i_gl, qd->qd_bh, 1);
534 534
535 if (!test_bit(QDF_CHANGE, &qd->qd_flags)) { 535 if (!test_bit(QDF_CHANGE, &qd->qd_flags)) {
@@ -560,7 +560,7 @@ static void do_qc(struct gfs2_quota_data *qd, int64_t change)
560 slot_hold(qd); 560 slot_hold(qd);
561 } 561 }
562 562
563 up(&sdp->sd_quota_mutex); 563 mutex_unlock(&sdp->sd_quota_mutex);
564} 564}
565 565
566/** 566/**