diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2018-12-24 14:45:04 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2018-12-27 21:01:41 -0500 |
commit | a289ce5311f406bf846614591300a948ebc42062 (patch) | |
tree | 52672e4111d17511c4b8f7c3beb7f804e790decc /fs/nfs/callback.c | |
parent | d4b09acf924b84bae77cad090a9d108e70b43643 (diff) |
sunrpc: replace svc_serv->sv_bc_xprt by boolean flag
svc_serv-> sv_bc_xprt is netns-unsafe and cannot be used as pointer.
To prevent its misuse in future it is replaced by new boolean flag.
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfs/callback.c')
-rw-r--r-- | fs/nfs/callback.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 509dc5adeb8f..6dd04774aedc 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -206,11 +206,13 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv, goto err_bind; } - ret = -EPROTONOSUPPORT; + ret = 0; if (!IS_ENABLED(CONFIG_NFS_V4_1) || minorversion == 0) ret = nfs4_callback_up_net(serv, net); - else if (xprt->ops->bc_up) - ret = xprt->ops->bc_up(serv, net); + else if (xprt->ops->bc_setup) + serv->sv_bc_enabled = true; + else + ret = -EPROTONOSUPPORT; if (ret < 0) { printk(KERN_ERR "NFS: callback service start failed\n"); |