- struct lu_attr *la_tmp = &mdd_env_info(env)->mti_la;
-
- rc = mdd_la_get(env, mdd_pobj, la_tmp, BYPASS_CAPA);
- if (!rc) {
- int same = 0;
-
- quota_opc = FSFILT_OP_CREATE;
- mdd_quota_wrapper(&ma->ma_attr, qcids);
- mdd_quota_wrapper(la_tmp, qpids);
- /* get file quota for child */
- lquota_chkquota(mds_quota_interface_ref, obd, exp,
- qcids, inode_pending, 1, NULL, 0, NULL,
- 0);
- switch (ma->ma_attr.la_mode & S_IFMT) {
- case S_IFLNK:
- case S_IFDIR:
- block_count = 2;
- break;
- case S_IFREG:
- block_count = 1;
- break;
- }
- if (qcids[USRQUOTA] == qpids[USRQUOTA] &&
- qcids[GRPQUOTA] == qpids[GRPQUOTA]) {
- block_count += 1;
- same = 1;
- }
- /* get block quota for child and parent */
- if (block_count)
- lquota_chkquota(mds_quota_interface_ref, obd,
- exp, qcids, block_pending,
- block_count, NULL,
- LQUOTA_FLAGS_BLK, NULL, 0);
- if (!same)
- lquota_chkquota(mds_quota_interface_ref, obd,
- exp, qpids, parent_pending, 1,
- NULL, LQUOTA_FLAGS_BLK, NULL,
- 0);
- }
+ int same = 0;
+
+ quota_opc = FSFILT_OP_CREATE;
+ mdd_quota_wrapper(attr, qcids);
+ mdd_quota_wrapper(pattr, qpids);
+ /* get file quota for child */
+ lquota_chkquota(mds_quota_interface_ref, obd, exp,
+ qcids, inode_pending, 1, NULL, 0, NULL,
+ 0);
+ switch (attr->la_mode & S_IFMT) {
+ case S_IFLNK:
+ case S_IFDIR:
+ block_count = 2;
+ break;
+ case S_IFREG:
+ block_count = 1;
+ break;
+ }
+ if (qcids[USRQUOTA] == qpids[USRQUOTA] &&
+ qcids[GRPQUOTA] == qpids[GRPQUOTA]) {
+ block_count += 1;
+ same = 1;
+ }
+ /* get block quota for child and parent */
+ if (block_count)
+ lquota_chkquota(mds_quota_interface_ref, obd,
+ exp, qcids, block_pending,
+ block_count, NULL,
+ LQUOTA_FLAGS_BLK, NULL, 0);
+ if (!same)
+ lquota_chkquota(mds_quota_interface_ref, obd,
+ exp, qpids, parent_pending, 1,
+ NULL, LQUOTA_FLAGS_BLK, NULL,
+ 0);