diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2013-08-09 12:49:19 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-09-03 15:26:35 -0400 |
commit | 3bd2384a77e7b277c1fd8dd4ebb071162e2d85b6 (patch) | |
tree | ac58801f4b16f4620d9e5f44124e5ec30df9b3bf /fs/nfs/nfs4xdr.c | |
parent | abf79bb341bf52f75f295b850abdf5f78f584311 (diff) |
NFS: NFSv4.0 transport blocking
Plumb in a mechanism for plugging an NFSv4.0 mount, using the
same infrastructure as NFSv4.1 sessions.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 4593728b9d0b..cb5f94640be6 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -1858,11 +1858,10 @@ static void encode_sequence(struct xdr_stream *xdr, | |||
1858 | struct nfs4_slot *slot = args->sa_slot; | 1858 | struct nfs4_slot *slot = args->sa_slot; |
1859 | __be32 *p; | 1859 | __be32 *p; |
1860 | 1860 | ||
1861 | if (slot == NULL) | ||
1862 | return; | ||
1863 | |||
1864 | tp = slot->table; | 1861 | tp = slot->table; |
1865 | session = tp->session; | 1862 | session = tp->session; |
1863 | if (!session) | ||
1864 | return; | ||
1866 | 1865 | ||
1867 | encode_op_hdr(xdr, OP_SEQUENCE, decode_sequence_maxsz, hdr); | 1866 | encode_op_hdr(xdr, OP_SEQUENCE, decode_sequence_maxsz, hdr); |
1868 | 1867 | ||
@@ -2043,9 +2042,9 @@ static void encode_free_stateid(struct xdr_stream *xdr, | |||
2043 | static u32 nfs4_xdr_minorversion(const struct nfs4_sequence_args *args) | 2042 | static u32 nfs4_xdr_minorversion(const struct nfs4_sequence_args *args) |
2044 | { | 2043 | { |
2045 | #if defined(CONFIG_NFS_V4_1) | 2044 | #if defined(CONFIG_NFS_V4_1) |
2046 | 2045 | struct nfs4_session *session = args->sa_slot->table->session; | |
2047 | if (args->sa_slot) | 2046 | if (session) |
2048 | return args->sa_slot->table->session->clp->cl_mvops->minor_version; | 2047 | return session->clp->cl_mvops->minor_version; |
2049 | #endif /* CONFIG_NFS_V4_1 */ | 2048 | #endif /* CONFIG_NFS_V4_1 */ |
2050 | return 0; | 2049 | return 0; |
2051 | } | 2050 | } |
@@ -5595,6 +5594,8 @@ static int decode_sequence(struct xdr_stream *xdr, | |||
5595 | 5594 | ||
5596 | if (res->sr_slot == NULL) | 5595 | if (res->sr_slot == NULL) |
5597 | return 0; | 5596 | return 0; |
5597 | if (!res->sr_slot->table->session) | ||
5598 | return 0; | ||
5598 | 5599 | ||
5599 | status = decode_op_hdr(xdr, OP_SEQUENCE); | 5600 | status = decode_op_hdr(xdr, OP_SEQUENCE); |
5600 | if (!status) | 5601 | if (!status) |