From patchwork Fri Sep 21 20:50:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 1493471 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4E1F240113 for ; Fri, 21 Sep 2012 20:53:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753011Ab2IUUw7 (ORCPT ); Fri, 21 Sep 2012 16:52:59 -0400 Received: from mx2.netapp.com ([216.240.18.37]:15785 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752577Ab2IUUw4 (ORCPT ); Fri, 21 Sep 2012 16:52:56 -0400 X-IronPort-AV: E=Sophos;i="4.80,464,1344236400"; d="scan'208";a="692516448" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 21 Sep 2012 13:52:56 -0700 Received: from lade.trondhjem.org.com (lade.trondhjem.org [10.63.228.34] (may be forged)) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id q8LKoiBp029417; Fri, 21 Sep 2012 13:52:52 -0700 (PDT) From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH v2 22/26] NFSv4.1: Remove unused 'default allocation' for pnfs_alloc_layout_hdr() Date: Fri, 21 Sep 2012 16:50:17 -0400 Message-Id: <1348260621-10294-22-git-send-email-Trond.Myklebust@netapp.com> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1348260621-10294-21-git-send-email-Trond.Myklebust@netapp.com> References: <1348260621-10294-1-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-2-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-3-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-4-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-5-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-6-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-7-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-8-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-9-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-10-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-11-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-12-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-13-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-14-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-15-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-16-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-17-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-18-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-19-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-20-git-send-email-Trond.Myklebust@netapp.com> <1348260621-10294-21-git-send-email-Trond.Myklebust@netapp.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org ...and ditto for pnfs_free_layout_hdr() Signed-off-by: Trond Myklebust --- fs/nfs/pnfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index bbdce87..196b8bb 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -200,8 +200,7 @@ static struct pnfs_layout_hdr * pnfs_alloc_layout_hdr(struct inode *ino, gfp_t gfp_flags) { struct pnfs_layoutdriver_type *ld = NFS_SERVER(ino)->pnfs_curr_ld; - return ld->alloc_layout_hdr ? ld->alloc_layout_hdr(ino, gfp_flags) : - kzalloc(sizeof(struct pnfs_layout_hdr), gfp_flags); + return ld->alloc_layout_hdr(ino, gfp_flags); } static void @@ -218,7 +217,7 @@ pnfs_free_layout_hdr(struct pnfs_layout_hdr *lo) spin_unlock(&clp->cl_lock); } put_rpccred(lo->plh_lc_cred); - return ld->alloc_layout_hdr ? ld->free_layout_hdr(lo) : kfree(lo); + return ld->free_layout_hdr(lo); } static void