Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'nfs-for-5.18-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
"One more pull request. There was a bug in the fix to ensure that gss-
proxy continues to work correctly after we fixed the AF_LOCAL socket
leak in the RPC code. This therefore reverts that broken patch, and
replaces it with one that works correctly.

Stable fixes:

- SUNRPC: Ensure that the gssproxy client can start in a connected
state

Bugfixes:

- Revert "SUNRPC: Ensure gss-proxy connects on setup"

- nfs: fix broken handling of the softreval mount option"

* tag 'nfs-for-5.18-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
nfs: fix broken handling of the softreval mount option
SUNRPC: Ensure that the gssproxy client can start in a connected state
Revert "SUNRPC: Ensure gss-proxy connects on setup"

+37 -6
+1 -1
fs/nfs/fs_context.c
··· 517 517 if (result.negated) 518 518 ctx->flags &= ~NFS_MOUNT_SOFTREVAL; 519 519 else 520 - ctx->flags &= NFS_MOUNT_SOFTREVAL; 520 + ctx->flags |= NFS_MOUNT_SOFTREVAL; 521 521 break; 522 522 case Opt_posix: 523 523 if (result.negated)
+1 -1
include/linux/sunrpc/clnt.h
··· 160 160 #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) 161 161 #define RPC_CLNT_CREATE_SOFTERR (1UL << 10) 162 162 #define RPC_CLNT_CREATE_REUSEPORT (1UL << 11) 163 - #define RPC_CLNT_CREATE_IGNORE_NULL_UNAVAIL (1UL << 12) 163 + #define RPC_CLNT_CREATE_CONNECTED (1UL << 12) 164 164 165 165 struct rpc_clnt *rpc_create(struct rpc_create_args *args); 166 166 struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *,
+2 -1
net/sunrpc/auth_gss/gss_rpc_upcall.c
··· 97 97 * timeout, which would result in reconnections being 98 98 * done without the correct namespace: 99 99 */ 100 - .flags = RPC_CLNT_CREATE_IGNORE_NULL_UNAVAIL | 100 + .flags = RPC_CLNT_CREATE_NOPING | 101 + RPC_CLNT_CREATE_CONNECTED | 101 102 RPC_CLNT_CREATE_NO_IDLE_TIMEOUT 102 103 }; 103 104 struct rpc_clnt *clnt;
+33 -3
net/sunrpc/clnt.c
··· 76 76 static int rpc_decode_header(struct rpc_task *task, 77 77 struct xdr_stream *xdr); 78 78 static int rpc_ping(struct rpc_clnt *clnt); 79 + static int rpc_ping_noreply(struct rpc_clnt *clnt); 79 80 static void rpc_check_timeout(struct rpc_task *task); 80 81 81 82 static void rpc_register_client(struct rpc_clnt *clnt) ··· 480 479 481 480 if (!(args->flags & RPC_CLNT_CREATE_NOPING)) { 482 481 int err = rpc_ping(clnt); 483 - if ((args->flags & RPC_CLNT_CREATE_IGNORE_NULL_UNAVAIL) && 484 - err == -EOPNOTSUPP) 485 - err = 0; 482 + if (err != 0) { 483 + rpc_shutdown_client(clnt); 484 + return ERR_PTR(err); 485 + } 486 + } else if (args->flags & RPC_CLNT_CREATE_CONNECTED) { 487 + int err = rpc_ping_noreply(clnt); 486 488 if (err != 0) { 487 489 rpc_shutdown_client(clnt); 488 490 return ERR_PTR(err); ··· 2716 2712 .p_decode = rpcproc_decode_null, 2717 2713 }; 2718 2714 2715 + static const struct rpc_procinfo rpcproc_null_noreply = { 2716 + .p_encode = rpcproc_encode_null, 2717 + }; 2718 + 2719 2719 static void 2720 2720 rpc_null_call_prepare(struct rpc_task *task, void *data) 2721 2721 { ··· 2766 2758 int status; 2767 2759 2768 2760 task = rpc_call_null_helper(clnt, NULL, NULL, 0, NULL, NULL); 2761 + if (IS_ERR(task)) 2762 + return PTR_ERR(task); 2763 + status = task->tk_status; 2764 + rpc_put_task(task); 2765 + return status; 2766 + } 2767 + 2768 + static int rpc_ping_noreply(struct rpc_clnt *clnt) 2769 + { 2770 + struct rpc_message msg = { 2771 + .rpc_proc = &rpcproc_null_noreply, 2772 + }; 2773 + struct rpc_task_setup task_setup_data = { 2774 + .rpc_client = clnt, 2775 + .rpc_message = &msg, 2776 + .callback_ops = &rpc_null_ops, 2777 + .flags = RPC_TASK_SOFT | RPC_TASK_SOFTCONN | RPC_TASK_NULLCREDS, 2778 + }; 2779 + struct rpc_task *task; 2780 + int status; 2781 + 2782 + task = rpc_run_task(&task_setup_data); 2769 2783 if (IS_ERR(task)) 2770 2784 return PTR_ERR(task); 2771 2785 status = task->tk_status;