nfs41: use nfs4_fs_locations_res
authorBenny Halevy <bhalevy@panasas.com>
Wed, 1 Apr 2009 13:22:02 +0000 (09:22 -0400)
committerBenny Halevy <bhalevy@panasas.com>
Wed, 17 Jun 2009 17:46:27 +0000 (10:46 -0700)
In preparation for nfs41 sequence processing.

Signed-off-by: Andy Admason <andros@netapp.com>
[find nfs4_fs_locations_res]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c
include/linux/nfs_xdr.h

index 62bbe25d9423cb344ed48a2743070e165756cf46..e08edc99faaccf41a422802110b2b9225b48e468 100644 (file)
@@ -3722,10 +3722,13 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
                .page = page,
                .bitmask = bitmask,
        };
+       struct nfs4_fs_locations_res res = {
+               .fs_locations = fs_locations,
+       };
        struct rpc_message msg = {
                .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_FS_LOCATIONS],
                .rpc_argp = &args,
-               .rpc_resp = fs_locations,
+               .rpc_resp = &res,
        };
        int status;
 
index aa350d5bf2070f8e8bea47a36154734545664f74..e448e33b4d05f8b9178c8b600ef6823c6dff063c 100644 (file)
@@ -4504,7 +4504,8 @@ out:
 /*
  * FS_LOCATIONS request
  */
-static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p, struct nfs4_fs_locations *res)
+static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p,
+                                    struct nfs4_fs_locations_res *res)
 {
        struct xdr_stream xdr;
        struct compound_hdr hdr;
@@ -4519,7 +4520,8 @@ static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p, struct nfs
        if ((status = decode_lookup(&xdr)) != 0)
                goto out;
        xdr_enter_page(&xdr, PAGE_SIZE);
-       status = decode_getfattr(&xdr, &res->fattr, res->server);
+       status = decode_getfattr(&xdr, &res->fs_locations->fattr,
+                                res->fs_locations->server);
 out:
        return status;
 }
index 0f2dc8f4cc36b4d61d41de04cd41fc5a7baa6bc0..d837f10c49ef4fa466fe85282b12b320ddfbc7ce 100644 (file)
@@ -867,6 +867,11 @@ struct nfs4_fs_locations_arg {
        struct nfs4_sequence_args       seq_args;
 };
 
+struct nfs4_fs_locations_res {
+       struct nfs4_fs_locations       *fs_locations;
+       struct nfs4_sequence_res        seq_res;
+};
+
 #endif /* CONFIG_NFS_V4 */
 
 struct nfs_page;