Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-14927 osd: share brw_stats code between OSD back ends.
[fs/lustre-release.git]
/
lustre
/
ptlrpc
/
sec_config.c
diff --git
a/lustre/ptlrpc/sec_config.c
b/lustre/ptlrpc/sec_config.c
index
22a230e
..
3f476ba
100644
(file)
--- a/
lustre/ptlrpc/sec_config.c
+++ b/
lustre/ptlrpc/sec_config.c
@@
-27,7
+27,6
@@
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*/
#define DEBUG_SUBSYSTEM S_SEC
*/
#define DEBUG_SUBSYSTEM S_SEC
@@
-895,8
+894,9
@@
void sptlrpc_target_choose_flavor(struct sptlrpc_rule_set *rset,
*/
void sptlrpc_conf_client_adapt(struct obd_device *obd)
{
*/
void sptlrpc_conf_client_adapt(struct obd_device *obd)
{
- struct obd_import *imp;
- ENTRY;
+ struct obd_import *imp;
+ int rc;
+ ENTRY;
LASSERT(strcmp(obd->obd_type->typ_name, LUSTRE_MDC_NAME) == 0 ||
strcmp(obd->obd_type->typ_name, LUSTRE_OSC_NAME) == 0 ||
LASSERT(strcmp(obd->obd_type->typ_name, LUSTRE_MDC_NAME) == 0 ||
strcmp(obd->obd_type->typ_name, LUSTRE_OSC_NAME) == 0 ||
@@
-905,10
+905,7
@@
void sptlrpc_conf_client_adapt(struct obd_device *obd)
CDEBUG(D_SEC, "obd %s\n", obd->u.cli.cl_target_uuid.uuid);
/* serialize with connect/disconnect import */
CDEBUG(D_SEC, "obd %s\n", obd->u.cli.cl_target_uuid.uuid);
/* serialize with connect/disconnect import */
- down_read_nested(&obd->u.cli.cl_sem, OBD_CLI_SEM_MDCOSC);
-
- imp = obd->u.cli.cl_import;
- if (imp) {
+ with_imp_locked_nested(obd, imp, rc, OBD_CLI_SEM_MDCOSC) {
write_lock(&imp->imp_sec_lock);
if (imp->imp_sec)
imp->imp_sec_expire = ktime_get_real_seconds() +
write_lock(&imp->imp_sec_lock);
if (imp->imp_sec)
imp->imp_sec_expire = ktime_get_real_seconds() +
@@
-916,7
+913,6
@@
void sptlrpc_conf_client_adapt(struct obd_device *obd)
write_unlock(&imp->imp_sec_lock);
}
write_unlock(&imp->imp_sec_lock);
}
- up_read(&obd->u.cli.cl_sem);
EXIT;
}
EXPORT_SYMBOL(sptlrpc_conf_client_adapt);
EXIT;
}
EXPORT_SYMBOL(sptlrpc_conf_client_adapt);