[PATCH 3/6] nfs41: get rid of unused struct nfs41_exchange_id_res members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



struct nfs41_exchange_id_res is currently allocated on the stack
insanely taking over 2K of stack space due to the NFS4_OPAQUE_LIMIT (1K)
byte arrays embedded in server_owner and server_scope.
Since these are not in use yet, this patch gets rid of them for the
time being.

Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx>
---
 fs/nfs/nfs4xdr.c        |   22 ++++++++++------------
 include/linux/nfs_xdr.h |    3 ---
 2 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index b7cfd36..d0fa05b 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4186,7 +4186,8 @@ static int decode_exchange_id(struct xdr_stream *xdr,
 			      struct nfs41_exchange_id_res *res)
 {
 	__be32 *p;
-	int status, dummy;
+	uint32_t dummy;
+	int status;
 	struct nfs_client *clp = res->client;
 
 	status = decode_op_hdr(xdr, OP_EXCHANGE_ID);
@@ -4204,22 +4205,19 @@ static int decode_exchange_id(struct xdr_stream *xdr,
 	if (dummy != SP4_NONE)
 		return -EIO;
 
-	/* minor_id */
+	/* Throw away minor_id */
 	READ_BUF(8);
-	READ64(res->server_owner.minor_id);
 
-	/* Major id */
+	/* Throw away Major id */
 	READ_BUF(4);
-	READ32(res->server_owner.major_id_sz);
-	READ_BUF(res->server_owner.major_id_sz);
-	COPYMEM(res->server_owner.major_id, res->server_owner.major_id_sz);
+	READ32(dummy);
+	READ_BUF(dummy);
 
-	/* server_scope */
+	/* Throw away server_scope */
 	READ_BUF(4);
-	READ32(res->server_scope.server_scope_sz);
-	READ_BUF(res->server_scope.server_scope_sz);
-	COPYMEM(res->server_scope.server_scope,
-		res->server_scope.server_scope_sz);
+	READ32(dummy);
+	READ_BUF(dummy);
+
 	/* Throw away Implementation id array */
 	READ_BUF(4);
 	READ32(dummy);
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 071a6d1..62f63fb 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -925,9 +925,6 @@ struct server_scope {
 struct nfs41_exchange_id_res {
 	struct nfs_client		*client;
 	u32				flags;
-	struct server_owner		server_owner;
-	struct server_scope		server_scope;
-	struct nfs_impl_id4		impl_id;
 };
 
 struct nfs41_create_session_args {
-- 
1.6.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux