Commit 19a5b935 authored by Niu Yawei's avatar Niu Yawei Committed by Greg Kroah-Hartman
Browse files

lustre/quota: improper assert in osc_quota_chkdq()



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: default avatarNiu Yawei <yawei.niu@intel.com>
Reviewed-on: http://review.whamcloud.com/8460
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4336


Reviewed-by: default avatarJohann Lombardi <johann.lombardi@intel.com>
Reviewed-by: default avatarFan Yong <fan.yong@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 15f13cde
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -51,11 +51,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) {
			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 */