Whamcloud - gitweb
Fix quota code problem where on osts objects might be greated with wrong uid/gid
authorgreen <green>
Mon, 4 Apr 2005 08:48:17 +0000 (08:48 +0000)
committergreen <green>
Mon, 4 Apr 2005 08:48:17 +0000 (08:48 +0000)
lustre/osc/osc_quota.c
lustre/osc/osc_request.c

index e84027b..74777dd 100644 (file)
@@ -87,7 +87,7 @@ static inline struct osc_quota_info *find_qinfo(struct client_obd *cli,
         for (head = qinfo_hash[hashent].next;
              head != qinfo_hash+hashent; head = head->next) {
                 oqi = list_entry(head, struct osc_quota_info, oqi_hash);
-                LASSERT(oqi->oqi_flag = NO_QUOTA);
+                LASSERT(oqi->oqi_flag == NO_QUOTA);
                 if (oqi->oqi_cli == cli &&
                     oqi->oqi_id == id && oqi->oqi_type == type)
                         return oqi;
index 0b75174..fd55e4f 100644 (file)
@@ -1373,16 +1373,8 @@ static struct ptlrpc_request *osc_build_req(struct client_obd *cli,
         LASSERT(ops != NULL);
         ops->ap_fill_obdo(caller_data, cmd, oa);
 
-        sort_brw_pages(pga, page_count);
-        rc = osc_brw_prep_request(cmd, cli->cl_import, oa, NULL, page_count,
-                                  pga, &requested_nob, &nio_count, &req);
-        if (rc != 0) {
-                CERROR("prep_req failed: %d\n", rc);
-                GOTO(out, req = ERR_PTR(rc));
-        }
-
         /* To enforce quota on oss, we need pass the client's user credit
-         * information to ost. We chose to store the fsuid and fsgid in 
+         * information to ost. We chose to store the fsuid and fsgid in
          * oa->o_uid and oa->o_gid since the two fields haven't been used
          * at present. And we chose one page's user credit information as
          * the whole rpc's credit information. FIXME */
@@ -1393,6 +1385,14 @@ static struct ptlrpc_request *osc_build_req(struct client_obd *cli,
                 oa->o_gid = ouc.ouc_fsgid;
         }
 
+        sort_brw_pages(pga, page_count);
+        rc = osc_brw_prep_request(cmd, cli->cl_import, oa, NULL, page_count,
+                                  pga, &requested_nob, &nio_count, &req);
+        if (rc != 0) {
+                CERROR("prep_req failed: %d\n", rc);
+                GOTO(out, req = ERR_PTR(rc));
+        }
+
         LASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
         aa = (struct osc_brw_async_args *)&req->rq_async_args;
         aa->aa_oa = oa;