Whamcloud - gitweb
LU-7903 hsm: leaked export refcount 42/21942/2
authorNiu Yawei <yawei.niu@intel.com>
Tue, 16 Aug 2016 08:59:35 +0000 (04:59 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 22 Aug 2016 03:45:05 +0000 (03:45 +0000)
Add missed class_export_put() in mdt_hsm_agent_send().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ie9119c53f11901573161034a85bfa7bf83ca6ff8
Reviewed-on: http://review.whamcloud.com/21942
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_hsm_cdt_agent.c

index 38bc739..dc8e9ad 100644 (file)
@@ -574,6 +574,8 @@ int mdt_hsm_agent_send(struct mdt_thread_info *mti,
         */
        exp = cfs_hash_lookup(mdt2obd_dev(mdt)->obd_uuid_hash, &uuid);
        if (exp == NULL || exp->exp_disconnected) {
         */
        exp = cfs_hash_lookup(mdt2obd_dev(mdt)->obd_uuid_hash, &uuid);
        if (exp == NULL || exp->exp_disconnected) {
+               if (exp != NULL)
+                       class_export_put(exp);
                /* This should clean up agents on evicted exports */
                rc = -ENOENT;
                CERROR("%s: agent uuid (%s) not found, unregistering:"
                /* This should clean up agents on evicted exports */
                rc = -ENOENT;
                CERROR("%s: agent uuid (%s) not found, unregistering:"