From: Andy Adamson Date: Fri, 18 May 2007 16:52:44 -0400 NFSv4: Add the NFS SECINFO proc Place the secinfo call on the wire Signed-off-by: Andy Adamson Signed-off-by: Trond Myklebust --- fs/nfs/nfs4proc.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 648e0ac..4945990 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3574,6 +3574,37 @@ int nfs4_proc_fs_locations(struct inode *dir, struct qstr *name, return status; } +static int +_nfs4_proc_secinfo(struct nfs_server *server, struct nfs_fh *dir_fh, + struct qstr *name, struct nfs4_secinfo_res *res) +{ + struct nfs4_secinfo_arg args = { + .dir_fh = dir_fh, + .name = name, + }; + struct rpc_message msg = { + .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SECINFO], + .rpc_argp = &args, + .rpc_resp = res, + }; + + return rpc_call_sync(server->client, &msg, 0); +} + +int nfs4_proc_secinfo(struct nfs_server *server, struct nfs_fh *dir_fh, + struct qstr *name, struct nfs4_secinfo_res *res) +{ + struct nfs4_exception exception = { }; + int err; + + do { + err = nfs4_handle_exception(server, + _nfs4_proc_secinfo(server, dir_fh, name, res), + &exception); + } while (exception.retry); + return err; +} + struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops = { .recover_open = nfs4_open_reclaim, .recover_lock = nfs4_lock_reclaim,