Loading fs/nfs/client.c +16 −0 Original line number Diff line number Diff line Loading @@ -527,6 +527,22 @@ void nfs_mark_client_ready(struct nfs_client *clp, int state) wake_up_all(&nfs_client_active_wq); } /* * With sessions, the client is not marked ready until after a * successful EXCHANGE_ID and CREATE_SESSION. * * Map errors cl_cons_state errors to EPROTONOSUPPORT to indicate * other versions of NFS can be tried. */ int nfs4_check_client_ready(struct nfs_client *clp) { if (!nfs4_has_session(clp)) return 0; if (clp->cl_cons_state < NFS_CS_READY) return -EPROTONOSUPPORT; return 0; } /* * Initialise the timeout values for a connection */ Loading fs/nfs/internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ extern struct nfs_server *nfs_clone_server(struct nfs_server *, struct nfs_fh *, struct nfs_fattr *); extern void nfs_mark_client_ready(struct nfs_client *clp, int state); extern int nfs4_check_client_ready(struct nfs_client *clp); #ifdef CONFIG_PROC_FS extern int __init nfs_fs_proc_init(void); extern void nfs_fs_proc_exit(void); Loading fs/nfs/nfs4proc.c +8 −1 Original line number Diff line number Diff line Loading @@ -2024,8 +2024,15 @@ static int _nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle, .rpc_argp = &args, .rpc_resp = &res, }; int status; nfs_fattr_init(info->fattr); return nfs4_call_sync(server, &msg, &args, &res, 0); status = nfs4_recover_expired_lease(server); if (!status) status = nfs4_check_client_ready(server->nfs_client); if (!status) status = nfs4_call_sync(server, &msg, &args, &res, 0); return status; } static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle, Loading Loading
fs/nfs/client.c +16 −0 Original line number Diff line number Diff line Loading @@ -527,6 +527,22 @@ void nfs_mark_client_ready(struct nfs_client *clp, int state) wake_up_all(&nfs_client_active_wq); } /* * With sessions, the client is not marked ready until after a * successful EXCHANGE_ID and CREATE_SESSION. * * Map errors cl_cons_state errors to EPROTONOSUPPORT to indicate * other versions of NFS can be tried. */ int nfs4_check_client_ready(struct nfs_client *clp) { if (!nfs4_has_session(clp)) return 0; if (clp->cl_cons_state < NFS_CS_READY) return -EPROTONOSUPPORT; return 0; } /* * Initialise the timeout values for a connection */ Loading
fs/nfs/internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ extern struct nfs_server *nfs_clone_server(struct nfs_server *, struct nfs_fh *, struct nfs_fattr *); extern void nfs_mark_client_ready(struct nfs_client *clp, int state); extern int nfs4_check_client_ready(struct nfs_client *clp); #ifdef CONFIG_PROC_FS extern int __init nfs_fs_proc_init(void); extern void nfs_fs_proc_exit(void); Loading
fs/nfs/nfs4proc.c +8 −1 Original line number Diff line number Diff line Loading @@ -2024,8 +2024,15 @@ static int _nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle, .rpc_argp = &args, .rpc_resp = &res, }; int status; nfs_fattr_init(info->fattr); return nfs4_call_sync(server, &msg, &args, &res, 0); status = nfs4_recover_expired_lease(server); if (!status) status = nfs4_check_client_ready(server->nfs_client); if (!status) status = nfs4_call_sync(server, &msg, &args, &res, 0); return status; } static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle, Loading