From mboxrd@z Thu Jan 1 00:00:00 1970 From: NeilBrown Subject: [PATCH 004 of 8] knfsd: nfsd4: fix enc_stateid_sz for nfsd callbacks Date: Thu, 21 Jun 2007 14:30:52 +1000 Message-ID: <1070621043052.1096@suse.de> References: <20070621142604.727.patches@notabene> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Neil Brown , "J. Bruce Fields" , linux-kernel@vger.kernel.org, "J. Bruce Fields" , nfs@lists.sourceforge.net, Benny Halevy To: Andrew Morton Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list2-new.sourceforge.net with esmtp (Exim 4.43) id 1I1EJw-0005m6-Ih for nfs@lists.sourceforge.net; Wed, 20 Jun 2007 21:31:00 -0700 Received: from cantor.suse.de ([195.135.220.2] helo=mx1.suse.de) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1I1EJz-0008ME-BP for nfs@lists.sourceforge.net; Wed, 20 Jun 2007 21:31:03 -0700 List-Id: "Discussion of NFS under Linux development, interoperability, and testing." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nfs-bounces@lists.sourceforge.net Errors-To: nfs-bounces@lists.sourceforge.net From: "J. Bruce Fields" enc_stateid_sz should be given in u32 words units, not bytes, so we were overestimating the buffer space needed here. Signed-off-by: Benny Halevy Signed-off-by: "J. Bruce Fields" Signed-off-by: Neil Brown ### Diffstat output ./fs/nfsd/nfs4callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff .prev/fs/nfsd/nfs4callback.c ./fs/nfsd/nfs4callback.c --- .prev/fs/nfsd/nfs4callback.c 2007-06-21 13:46:38.000000000 +1000 +++ ./fs/nfsd/nfs4callback.c 2007-06-21 14:10:31.000000000 +1000 @@ -75,7 +75,7 @@ enum nfs_cb_opnum4 { #define op_enc_sz 1 #define op_dec_sz 2 #define enc_nfs4_fh_sz (1 + (NFS4_FHSIZE >> 2)) -#define enc_stateid_sz 16 +#define enc_stateid_sz (NFS4_STATEID_SIZE >> 2) #define NFS4_enc_cb_recall_sz (cb_compound_enc_hdr_sz + \ 1 + enc_stateid_sz + \ enc_nfs4_fh_sz) ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757352AbXFUEcM (ORCPT ); Thu, 21 Jun 2007 00:32:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754835AbXFUEbE (ORCPT ); Thu, 21 Jun 2007 00:31:04 -0400 Received: from ns1.suse.de ([195.135.220.2]:41718 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752776AbXFUEbC (ORCPT ); Thu, 21 Jun 2007 00:31:02 -0400 From: NeilBrown To: Andrew Morton Date: Thu, 21 Jun 2007 14:30:52 +1000 Message-Id: <1070621043052.1096@suse.de> X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D Cc: "J. Bruce Fields" Cc: "J. Bruce Fields" Cc: Neil Brown Subject: [PATCH 004 of 8] knfsd: nfsd4: fix enc_stateid_sz for nfsd callbacks References: <20070621142604.727.patches@notabene> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org From: "J. Bruce Fields" enc_stateid_sz should be given in u32 words units, not bytes, so we were overestimating the buffer space needed here. Signed-off-by: Benny Halevy Signed-off-by: "J. Bruce Fields" Signed-off-by: Neil Brown ### Diffstat output ./fs/nfsd/nfs4callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff .prev/fs/nfsd/nfs4callback.c ./fs/nfsd/nfs4callback.c --- .prev/fs/nfsd/nfs4callback.c 2007-06-21 13:46:38.000000000 +1000 +++ ./fs/nfsd/nfs4callback.c 2007-06-21 14:10:31.000000000 +1000 @@ -75,7 +75,7 @@ enum nfs_cb_opnum4 { #define op_enc_sz 1 #define op_dec_sz 2 #define enc_nfs4_fh_sz (1 + (NFS4_FHSIZE >> 2)) -#define enc_stateid_sz 16 +#define enc_stateid_sz (NFS4_STATEID_SIZE >> 2) #define NFS4_enc_cb_recall_sz (cb_compound_enc_hdr_sz + \ 1 + enc_stateid_sz + \ enc_nfs4_fh_sz)