Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / obdfilter / filter_io_26.c
index aa49c15..44178ee 100644 (file)
@@ -551,7 +551,7 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
         struct lvfs_run_ctxt saved;
         struct fsfilt_objinfo fso;
         struct iattr iattr = { 0 };
-        struct inode *inode = NULL;
+        struct inode *inode = res->dentry->d_inode;
         unsigned long now = jiffies;
         int i, err, cleanup_phase = 0;
         struct obd_device *obd = exp->exp_obd;
@@ -573,7 +573,7 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
          * decide if it is out of quota or not b=14783 */
         lquota_chkquota(filter_quota_interface_ref, obd, oa->o_uid,
                         oa->o_gid, niocount, &rec_pending, oti,
-                        LQUOTA_FLAGS_BLK);
+                        LQUOTA_FLAGS_BLK, inode, obj->ioo_bufcnt);
 
         iobuf = filter_iobuf_get(&obd->u.filter, oti);
         if (IS_ERR(iobuf))
@@ -582,7 +582,6 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
 
         fso.fso_dentry = res->dentry;
         fso.fso_bufcnt = obj->ioo_bufcnt;
-        inode = res->dentry->d_inode;
 
         iobuf->dr_ignore_quota = 0;
         for (i = 0, lnb = res; i < niocount; i++, lnb++) {
@@ -721,7 +720,7 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
 cleanup:
         if (rec_pending)
                 lquota_pending_commit(filter_quota_interface_ref, obd, oa->o_uid,
-                                      oa->o_gid, niocount, 1);
+                                      oa->o_gid, rec_pending, 1);
 
         filter_grant_commit(exp, niocount, res);