NFS: Add secinfo procedure
This patch adds the nfs4 operation secinfo as a valid nfs rpc operation. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
committed by
Trond Myklebust
parent
7c5130588d
commit
5a5ea0d485
@@ -4639,6 +4639,40 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
|
||||
return status;
|
||||
}
|
||||
|
||||
static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct nfs4_secinfo_flavors *flavors)
|
||||
{
|
||||
int status;
|
||||
struct nfs4_secinfo_arg args = {
|
||||
.dir_fh = NFS_FH(dir),
|
||||
.name = name,
|
||||
};
|
||||
struct nfs4_secinfo_res res = {
|
||||
.flavors = flavors,
|
||||
};
|
||||
struct rpc_message msg = {
|
||||
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SECINFO],
|
||||
.rpc_argp = &args,
|
||||
.rpc_resp = &res,
|
||||
};
|
||||
|
||||
dprintk("NFS call secinfo %s\n", name->name);
|
||||
status = nfs4_call_sync(NFS_SERVER(dir)->client, NFS_SERVER(dir), &msg, &args.seq_args, &res.seq_res, 0);
|
||||
dprintk("NFS reply secinfo: %d\n", status);
|
||||
return status;
|
||||
}
|
||||
|
||||
int nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct nfs4_secinfo_flavors *flavors)
|
||||
{
|
||||
struct nfs4_exception exception = { };
|
||||
int err;
|
||||
do {
|
||||
err = nfs4_handle_exception(NFS_SERVER(dir),
|
||||
_nfs4_proc_secinfo(dir, name, flavors),
|
||||
&exception);
|
||||
} while (exception.retry);
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NFS_V4_1
|
||||
/*
|
||||
* Check the exchange flags returned by the server for invalid flags, having
|
||||
@@ -5756,6 +5790,7 @@ const struct nfs_rpc_ops nfs_v4_clientops = {
|
||||
.close_context = nfs4_close_context,
|
||||
.open_context = nfs4_atomic_open,
|
||||
.init_client = nfs4_init_client,
|
||||
.secinfo = nfs4_proc_secinfo,
|
||||
};
|
||||
|
||||
static const struct xattr_handler nfs4_xattr_nfs4_acl_handler = {
|
||||
|
Reference in New Issue
Block a user