struct lquota_id_info *qi, struct osd_object *obj,
bool enforce, int *flags)
{
- struct osd_device *dev = osd_dt_dev(oh->ot_super.th_dev);
- struct qsd_instance *qsd = dev->od_quota_slave;
+ struct osd_device *dev;
+ struct qsd_instance *qsd;
struct inode *inode = NULL;
int i, rc = 0, crd;
bool found = false;
LASSERTF(oh->ot_id_cnt <= OSD_MAX_UGID_CNT, "count=%d\n",
oh->ot_id_cnt);
+ dev = osd_dt_dev(oh->ot_super.th_dev);
+ LASSERT(dev != NULL);
+
+ qsd = dev->od_quota_slave;
+
for (i = 0; i < oh->ot_id_cnt; i++) {
if (oh->ot_id_array[i] == qi->lqi_id.qid_uid &&
osd_qid_type(oh, i) == qi->lqi_type) {