* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2014, Intel Corporation.
+ * Copyright (c) 2011, 2015, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
struct obd_import *imp;
ENTRY;
- LASSERT(strcmp(obd->obd_type->typ_name, LUSTRE_MDC_NAME) == 0 ||
- strcmp(obd->obd_type->typ_name, LUSTRE_OSC_NAME) ==0);
- CDEBUG(D_SEC, "obd %s\n", obd->u.cli.cl_target_uuid.uuid);
+ LASSERT(strcmp(obd->obd_type->typ_name, LUSTRE_MDC_NAME) == 0 ||
+ strcmp(obd->obd_type->typ_name, LUSTRE_OSC_NAME) == 0 ||
+ strcmp(obd->obd_type->typ_name, LUSTRE_OSP_NAME) == 0 ||
+ strcmp(obd->obd_type->typ_name, LUSTRE_LWP_NAME) == 0);
+ CDEBUG(D_SEC, "obd %s\n", obd->u.cli.cl_target_uuid.uuid);
/* serialize with connect/disconnect import */
down_read(&obd->u.cli.cl_sem);
static void rule2string(struct sptlrpc_rule *r, char *buf, int buflen)
{
- char dirbuf[8];
- char *net;
- char *ptr = buf;
+ char dirbuf[8];
+ char net[LNET_NIDSTR_SIZE] = "default";
+ char *ptr = buf;
- if (r->sr_netid == LNET_NIDNET(LNET_NID_ANY))
- net = "default";
- else
- net = libcfs_net2str(r->sr_netid);
+ if (r->sr_netid != LNET_NIDNET(LNET_NID_ANY))
+ libcfs_net2str_r(r->sr_netid, net, sizeof(net));
if (r->sr_from == LUSTRE_SP_ANY && r->sr_to == LUSTRE_SP_ANY)
dirbuf[0] = '\0';