From patchwork Mon May 19 15:15:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weston Andros Adamson X-Patchwork-Id: 4202861 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 05A9D9F32A for ; Mon, 19 May 2014 15:15:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0007F202A7 for ; Mon, 19 May 2014 15:15:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A92B20270 for ; Mon, 19 May 2014 15:15:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754384AbaESPP3 (ORCPT ); Mon, 19 May 2014 11:15:29 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:50093 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754702AbaESPP2 (ORCPT ); Mon, 19 May 2014 11:15:28 -0400 Received: by mail-ie0-f174.google.com with SMTP id lx4so2457492iec.33 for ; Mon, 19 May 2014 08:15:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R6f73aozp9CO4diU96ZsANrsYtbgD7f6rAtKgTmEL+g=; b=epUXds3BlRT5tPwNKX/eAp/0lyMmUh19iN+B7GKT8n0HN63WjgqpY966tO8Urqa3bS n/KkpTleJCPOnSvPOzpCmIDXVO3Erpj1aO2zwri/j41QvnyamNoHq0HE1NZV0LJXr/Oi 6mVhi1xn9mL6jP9l71r1F3ml0YKKCrJdAoeSyHG2cnTdamgUMLC/VgVjATTVFV2wgQKe ouKxUH88cPRQQ37RG5+akDss4HcWwBJK+p7LMTxnVpXxH0nFvBf51uwyEm0Lng0ISxLJ PN0pR8Rug99F6KO88mR0/eJ3jj8MLlhOig7sxmtVaI3A1i6T6FSeHt6WAL1gBhccq8+z yBYg== X-Gm-Message-State: ALoCoQmK3DWzGE2hfv5lZeQIOpWUQQeKRkNYPmGLbpfdP+HZF1wqJGqa5pE2w/gAefLIfzVFqcxI X-Received: by 10.50.153.8 with SMTP id vc8mr17995010igb.16.1400512527923; Mon, 19 May 2014 08:15:27 -0700 (PDT) Received: from gavrio-wifi.robotsandstuff.fake (c-98-209-19-144.hsd1.mi.comcast.net. [98.209.19.144]) by mx.google.com with ESMTPSA id d6sm14213191igr.12.2014.05.19.08.15.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 19 May 2014 08:15:26 -0700 (PDT) From: Weston Andros Adamson To: trond.myklebust@primarydata.com Cc: linux-nfs@vger.kernel.org, Weston Andros Adamson Subject: [PATCH 8/8] pnfs: merge identical functions Date: Mon, 19 May 2014 11:15:08 -0400 Message-Id: <1400512508-7530-9-git-send-email-dros@primarydata.com> X-Mailer: git-send-email 1.8.5.2 (Apple Git-48) In-Reply-To: <1400512508-7530-1-git-send-email-dros@primarydata.com> References: <1400512508-7530-1-git-send-email-dros@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 pnfs_readhdr_free and pnfs_writehdr_free were identical - merge them info pnfs_pgio_header_free. Also drop EXPORT_SYMBOL_GPL of static function. Signed-off-by: Weston Andros Adamson --- fs/nfs/pnfs.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 79792a4..d45cca8 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1552,12 +1552,11 @@ pnfs_do_write(struct nfs_pageio_descriptor *desc, pnfs_put_lseg(lseg); } -static void pnfs_writehdr_free(struct nfs_pgio_header *hdr) +static void pnfs_pgio_header_free(struct nfs_pgio_header *hdr) { pnfs_put_lseg(hdr->lseg); nfs_pgio_header_free(hdr); } -EXPORT_SYMBOL_GPL(pnfs_writehdr_free); int pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc) @@ -1572,7 +1571,7 @@ pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc) desc->pg_lseg = NULL; return -ENOMEM; } - nfs_pgheader_init(desc, hdr, pnfs_writehdr_free); + nfs_pgheader_init(desc, hdr, pnfs_pgio_header_free); hdr->lseg = pnfs_get_lseg(desc->pg_lseg); ret = nfs_generic_pgio(desc, hdr); if (ret != 0) { @@ -1671,13 +1670,6 @@ pnfs_do_read(struct nfs_pageio_descriptor *desc, struct nfs_pgio_header *hdr) pnfs_put_lseg(lseg); } -static void pnfs_readhdr_free(struct nfs_pgio_header *hdr) -{ - pnfs_put_lseg(hdr->lseg); - nfs_pgio_header_free(hdr); -} -EXPORT_SYMBOL_GPL(pnfs_readhdr_free); - int pnfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc) { @@ -1692,7 +1684,7 @@ pnfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc) desc->pg_lseg = NULL; return ret; } - nfs_pgheader_init(desc, hdr, pnfs_readhdr_free); + nfs_pgheader_init(desc, hdr, pnfs_pgio_header_free); hdr->lseg = pnfs_get_lseg(desc->pg_lseg); ret = nfs_generic_pgio(desc, hdr); if (ret != 0) {