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
LU-16772 quota: protect lqe_glbl_data in qmt_site_recalc_cb
[fs/lustre-release.git]
/
lustre
/
quota
/
qmt_entry.c
diff --git
a/lustre/quota/qmt_entry.c
b/lustre/quota/qmt_entry.c
index
b17b19a
..
cb3dca2
100644
(file)
--- a/
lustre/quota/qmt_entry.c
+++ b/
lustre/quota/qmt_entry.c
@@
-1118,6
+1118,9
@@
struct lqe_glbl_data *qmt_alloc_lqe_gd(struct qmt_pool_info *pool, int qtype)
void qmt_free_lqe_gd(struct lqe_glbl_data *lgd)
{
+ if (unlikely(!lgd))
+ return;
+
OBD_FREE(lgd->lqeg_arr,
sizeof(struct lqe_glbl_entry) * lgd->lqeg_num_alloc);
OBD_FREE(lgd, sizeof(struct lqe_glbl_data));