Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Branch HEAD
[fs/lustre-release.git]
/
lustre
/
quota
/
quota_interface.c
diff --git
a/lustre/quota/quota_interface.c
b/lustre/quota/quota_interface.c
index
5cf9505
..
f257cd5
100644
(file)
--- 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 */
/* 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;
lqs->lqs_bwrite_pending += *pending;
} else {
*pending = count;