X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fquota%2Fquota_interface.c;h=f257cd57a4a7f8645d2236a2089409e2517dd451;hp=5cf9505bd8907f6104e81118f97c8a7c257fb784;hb=c159c408293fbebf71a948e630aa9f637f3c8ffe;hpb=bc60e9e0608e0afbda9e1439bf98730a83a5bb87 diff --git a/lustre/quota/quota_interface.c b/lustre/quota/quota_interface.c index 5cf9505..f257cd5 100644 --- a/lustre/quota/quota_interface.c +++ b/lustre/quota/quota_interface.c @@ -287,14 +287,17 @@ static int quota_check_common(struct obd_device *obd, unsigned int uid, /* in order to complete this write, we need extra * meta blocks. This function can get it through * data needed to be written b=16542 */ - mb = *pending; - LASSERT(inode && frags > 0); - if (fsfilt_get_mblk(obd, qctxt->lqc_sb, &mb, - inode, frags) < 0) - CDEBUG(D_ERROR, - "can't get extra meta blocks.\n"); - else - *pending += mb; + if (inode) { + mb = *pending; + rc = fsfilt_get_mblk(obd, qctxt->lqc_sb, + &mb, inode,frags); + if (rc) + CDEBUG(D_ERROR, + "can't get extra " + "meta blocks.\n"); + else + *pending += mb; + } lqs->lqs_bwrite_pending += *pending; } else { *pending = count;