Commit d0f17b64 authored by Chen Gang's avatar Chen Gang Committed by Greg Kroah-Hartman

drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

Some of architectures have already defined 'die' as macro, so can not
use it as declaration or definition in other modules, or it will cause
compiling issue.

So use more precise name 'force_die' (like 'wrap_bulk') instead of. And
the related error (with allmodconfig under score):

    CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'sptlrpc_cli_ctx_expire':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct ptlrpc_ctx_ops' has no member named '__die'
    ctx->cc_ops->die(ctx, 0);
               ^
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'ctx_refresh_timeout':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct ptlrpc_ctx_ops' has no member named '__die'
     req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
                            ^
  make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
  make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
  make[3]: *** [drivers/staging/lustre/lustre] Error 2
  make[2]: *** [drivers/staging/lustre] Error 2
  make[1]: *** [drivers/staging] Error 2
  make: *** [drivers] Error 2
Signed-off-by: default avatarChen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 589e1d10
...@@ -387,7 +387,7 @@ struct ptlrpc_ctx_ops { ...@@ -387,7 +387,7 @@ struct ptlrpc_ctx_ops {
/** /**
* Force the \a ctx to die. * Force the \a ctx to die.
*/ */
void (*die) (struct ptlrpc_cli_ctx *ctx, void (*force_die) (struct ptlrpc_cli_ctx *ctx,
int grace); int grace);
int (*display) (struct ptlrpc_cli_ctx *ctx, int (*display) (struct ptlrpc_cli_ctx *ctx,
char *buf, int bufsize); char *buf, int bufsize);
......
...@@ -305,8 +305,8 @@ EXPORT_SYMBOL(sptlrpc_cli_ctx_put); ...@@ -305,8 +305,8 @@ EXPORT_SYMBOL(sptlrpc_cli_ctx_put);
*/ */
void sptlrpc_cli_ctx_expire(struct ptlrpc_cli_ctx *ctx) void sptlrpc_cli_ctx_expire(struct ptlrpc_cli_ctx *ctx)
{ {
LASSERT(ctx->cc_ops->die); LASSERT(ctx->cc_ops->force_die);
ctx->cc_ops->die(ctx, 0); ctx->cc_ops->force_die(ctx, 0);
} }
EXPORT_SYMBOL(sptlrpc_cli_ctx_expire); EXPORT_SYMBOL(sptlrpc_cli_ctx_expire);
...@@ -591,7 +591,7 @@ int ctx_refresh_timeout(void *data) ...@@ -591,7 +591,7 @@ int ctx_refresh_timeout(void *data)
* later than the context refresh expire time. * later than the context refresh expire time.
*/ */
if (rc == 0) if (rc == 0)
req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0); req->rq_cli_ctx->cc_ops->force_die(req->rq_cli_ctx, 0);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment