X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Fobd_class.h;h=703ffafbf837263f085a10f3fe847888c14574b2;hb=168ec247779f3ab743985bdbad605f8eacd8fc81;hp=cdf9e9a39e0978f9b77bfa879bddedbb3bce2ace;hpb=45a3e85f5c8924c85c0090e14748dc2cad366e53;p=fs%2Flustre-release.git diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index cdf9e9a..703ffaf 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -634,23 +634,25 @@ static inline int obd_cleanup(struct obd_device *obd) static inline void obd_cleanup_client_import(struct obd_device *obd) { - ENTRY; + ENTRY; - /* If we set up but never connected, the - client import will not have been cleaned. */ + /* If we set up but never connected, the client import will not + * have been cleaned. + */ down_write(&obd->u.cli.cl_sem); - if (obd->u.cli.cl_import) { - struct obd_import *imp; - imp = obd->u.cli.cl_import; - CDEBUG(D_CONFIG, "%s: client import never connected\n", - obd->obd_name); - ptlrpc_invalidate_import(imp); - client_destroy_import(imp); - obd->u.cli.cl_import = NULL; - } + if (obd->u.cli.cl_import) { + struct obd_import *imp; + + imp = obd->u.cli.cl_import; + CDEBUG(D_CONFIG, "%s: client import never connected\n", + obd->obd_name); + ptlrpc_invalidate_import(imp); + client_destroy_import(imp); + obd->u.cli.cl_import = NULL; + } up_write(&obd->u.cli.cl_sem); - EXIT; + EXIT; } static inline int obd_process_config(struct obd_device *obd, int datalen,