Whamcloud - gitweb
LU-2394 llog: Fix a NULL pointer dereference
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_quota.c
index 5cfd1f5..2bf0b5d 100644 (file)
@@ -28,7 +28,7 @@
  * Author: Niu    Yawei    <niu@whamcloud.com>
  */
 
-#include <lquota.h>
+#include <lustre_quota.h>
 #include "osd_internal.h"
 
 /**
@@ -511,8 +511,9 @@ int osd_declare_qid(const struct lu_env *env, struct osd_thandle *oh,
                        RETURN(-EOVERFLOW);
                }
 
-               oh->ot_credits += (allocated || qi->lqi_id.qid_uid == 0) ?
-                       1 : LDISKFS_QUOTA_INIT_BLOCKS(osd_sb(dev));
+               OSD_DECLARE_OP(oh, quota,
+                              (allocated || qi->lqi_id.qid_uid == 0) ?
+                              1 : LDISKFS_QUOTA_INIT_BLOCKS(osd_sb(dev)));
 
                oh->ot_id_array[i] = qi->lqi_id.qid_uid;
                osd_qid_set_type(oh, i, qi->lqi_type);