From: yury Date: Thu, 7 Sep 2006 06:20:06 +0000 (+0000) Subject: - added ref to export in fld_client_add_target(); X-Git-Tag: v1_8_0_110~486^2~1000 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0981fa71e3fed2a85e1cfbbb4933b7ed83de29f0;p=fs%2Flustre-release.git - added ref to export in fld_client_add_target(); - check if export not NULL before put it in fld_client_del_target(), exports may be NULL in case of local server. --- diff --git a/lustre/fld/fld_request.c b/lustre/fld/fld_request.c index b1b66b9..7c1440f 100644 --- a/lustre/fld/fld_request.c +++ b/lustre/fld/fld_request.c @@ -161,6 +161,8 @@ int fld_client_add_target(struct lu_client_fld *fld, } target->ft_exp = tar->ft_exp; + if (target->ft_exp != NULL) + class_export_get(target->ft_exp); target->ft_srv = tar->ft_srv; target->ft_idx = tar->ft_idx; @@ -188,7 +190,10 @@ int fld_client_del_target(struct lu_client_fld *fld, fld->lcf_count--; list_del(&target->ft_chain); spin_unlock(&fld->lcf_lock); - class_export_put(target->ft_exp); + + if (target->ft_exp != NULL) + class_export_put(target->ft_exp); + OBD_FREE_PTR(target); RETURN(0); }