summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 01dcd4c8dc4f..e1a26c653e78 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3805,6 +3805,54 @@ nfs4_proc_lookup_mountpoint(struct inode *dir, const struct qstr *name,
3805 return (client == NFS_CLIENT(dir)) ? rpc_clone_client(client) : client; 3805 return (client == NFS_CLIENT(dir)) ? rpc_clone_client(client) : client;
3806} 3806}
3807 3807
3808static int _nfs4_proc_lookupp(struct inode *inode,
3809 struct nfs_fh *fhandle, struct nfs_fattr *fattr,
3810 struct nfs4_label *label)
3811{
3812 struct rpc_clnt *clnt = NFS_CLIENT(inode);
3813 struct nfs_server *server = NFS_SERVER(inode);
3814 int status;
3815 struct nfs4_lookupp_arg args = {
3816 .bitmask = server->attr_bitmask,
3817 .fh = NFS_FH(inode),
3818 };
3819 struct nfs4_lookupp_res res = {
3820 .server = server,
3821 .fattr = fattr,
3822 .label = label,
3823 .fh = fhandle,
3824 };
3825 struct rpc_message msg = {
3826 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOOKUPP],
3827 .rpc_argp = &args,
3828 .rpc_resp = &res,
3829 };
3830
3831 args.bitmask = nfs4_bitmask(server, label);
3832
3833 nfs_fattr_init(fattr);
3834
3835 dprintk("NFS call lookupp ino=0x%lx\n", inode->i_ino);
3836 status = nfs4_call_sync(clnt, server, &msg, &args.seq_args,
3837 &res.seq_res, 0);
3838 dprintk("NFS reply lookupp: %d\n", status);
3839 return status;
3840}
3841
3842static int nfs4_proc_lookupp(struct inode *inode, struct nfs_fh *fhandle,
3843 struct nfs_fattr *fattr, struct nfs4_label *label)
3844{
3845 struct nfs4_exception exception = { };
3846 int err;
3847 do {
3848 err = _nfs4_proc_lookupp(inode, fhandle, fattr, label);
3849 trace_nfs4_lookupp(inode, err);
3850 err = nfs4_handle_exception(NFS_SERVER(inode), err,
3851 &exception);
3852 } while (exception.retry);
3853 return err;
3854}
3855
3808static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry) 3856static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry)
3809{ 3857{
3810 struct nfs_server *server = NFS_SERVER(inode); 3858 struct nfs_server *server = NFS_SERVER(inode);
@@ -9314,6 +9362,7 @@ const struct nfs_rpc_ops nfs_v4_clientops = {
9314 .getattr = nfs4_proc_getattr, 9362 .getattr = nfs4_proc_getattr,
9315 .setattr = nfs4_proc_setattr, 9363 .setattr = nfs4_proc_setattr,
9316 .lookup = nfs4_proc_lookup, 9364 .lookup = nfs4_proc_lookup,
9365 .lookupp = nfs4_proc_lookupp,
9317 .access = nfs4_proc_access, 9366 .access = nfs4_proc_access,
9318 .readlink = nfs4_proc_readlink, 9367 .readlink = nfs4_proc_readlink,
9319 .create = nfs4_proc_create, 9368 .create = nfs4_proc_create,