From patchwork Sun Mar 15 15:35:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 6013391 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D6E84BF90F for ; Sun, 15 Mar 2015 15:35:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A74220268 for ; Sun, 15 Mar 2015 15:35:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 183912024F for ; Sun, 15 Mar 2015 15:35:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752244AbbCOPfU (ORCPT ); Sun, 15 Mar 2015 11:35:20 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:33828 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752115AbbCOPfU (ORCPT ); Sun, 15 Mar 2015 11:35:20 -0400 Received: by pdbni2 with SMTP id ni2so33508932pdb.1 for ; Sun, 15 Mar 2015 08:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=L3lq4KCUwhhLbSsY219YOzTStuhrELNaREvQ++9MDN4=; b=n0FuMjqQ5/ZVdQGD+79c4Q9sQTTm7hmkH7kGOlLIXymx6UaWYVKqS0+5cnwSxpJf4c t6RIehiaungI1u0PdoAWUDObmTZLESR3DUQruADbTKA42ZpJJkD3U/Rru9+sOWaHEr6j RV/LSEPLgywz6FZm6DFW4lYPSOngQazZkvwOmXbx8R/DOIKRlkIKU3WwDjLiDKaoElV5 Ad0Uf5xnbzUD9lmeIckYnOW0u33jnH3reyOq+S4iHWtB1McIivx3O+MTaF+d/4FJpVDF 95ToYl8YiTA9LgmbAM9z9tjIQdIvivJvzETzW9is1bpsf+DRQ8NVPc9qlK3bfDTwVM8j vEvg== X-Received: by 10.70.133.2 with SMTP id oy2mr67979338pdb.169.1426433719543; Sun, 15 Mar 2015 08:35:19 -0700 (PDT) Received: from [192.168.99.5] ([104.143.41.8]) by mx.google.com with ESMTPSA id j4sm12866565pdk.76.2015.03.15.08.35.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2015 08:35:18 -0700 (PDT) Message-ID: <5505A6AF.7040608@gmail.com> Date: Sun, 15 Mar 2015 23:35:11 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "J. Bruce Fields" CC: Anna.Schumaker@netapp.com, Linux NFS Mailing List Subject: [PATCH] NFSD: Use correct reply size calculating function Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ALLOCATE/DEALLOCATE only reply one status value to client, so, using nfsd4_only_status_rsize for reply size calculating. Signed-off-by: Kinglong Mee --- fs/nfsd/nfs4proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 92b9d97..4449359 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -2282,13 +2282,13 @@ static struct nfsd4_operation nfsd4_ops[] = { .op_func = (nfsd4op_func)nfsd4_allocate, .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME, .op_name = "OP_ALLOCATE", - .op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize, + .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize, }, [OP_DEALLOCATE] = { .op_func = (nfsd4op_func)nfsd4_deallocate, .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME, .op_name = "OP_DEALLOCATE", - .op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize, + .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize, }, [OP_SEEK] = { .op_func = (nfsd4op_func)nfsd4_seek,