Whamcloud - gitweb
LU-4336 quota: improper assert in osc_quota_chkdq() 60/8460/2
authorNiu Yawei <yawei.niu@intel.com>
Tue, 3 Dec 2013 01:57:40 +0000 (20:57 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 15 Dec 2013 13:33:23 +0000 (13:33 +0000)
In osc_quota_chkdq(), we should never try to access oqi found
from hash, since it could have been freed by osc_quota_setdq().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ia73cf89cb5bbd730fa6f0a00e44771f733b2baa6
Reviewed-on: http://review.whamcloud.com/8460
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
lustre/osc/osc_quota.c

index d33f1ea..f22447b 100644 (file)
@@ -55,11 +55,8 @@ int osc_quota_chkdq(struct client_obd *cli, const unsigned int qid[])
 
                oqi = cfs_hash_lookup(cli->cl_quota_hash[type], &qid[type]);
                if (oqi) {
 
                oqi = cfs_hash_lookup(cli->cl_quota_hash[type], &qid[type]);
                if (oqi) {
-                       obd_uid id = oqi->oqi_id;
-
-                       LASSERTF(id == qid[type],
-                                "The ids don't match %u != %u\n",
-                                id, qid[type]);
+                       /* do not try to access oqi here, it could have been
+                        * freed by osc_quota_setdq() */
 
                        /* the slot is busy, the user is about to run out of
                         * quota space on this OST */
 
                        /* the slot is busy, the user is about to run out of
                         * quota space on this OST */