From patchwork Wed Jun 10 20:54:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 6585131 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 CBED0C0020 for ; Wed, 10 Jun 2015 20:54:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2E082060E for ; Wed, 10 Jun 2015 20:54:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C17CF20606 for ; Wed, 10 Jun 2015 20:54:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933630AbbFJUyd (ORCPT ); Wed, 10 Jun 2015 16:54:33 -0400 Received: from mx142.netapp.com ([216.240.21.19]:27540 "EHLO mx142.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932939AbbFJUyb (ORCPT ); Wed, 10 Jun 2015 16:54:31 -0400 X-IronPort-AV: E=Sophos;i="5.13,589,1427785200"; d="scan'208";a="46676345" Received: from vmwexchts04-prd.hq.netapp.com ([10.122.105.32]) by mx142-out.netapp.com with ESMTP; 10 Jun 2015 13:54:30 -0700 Received: from smtp1.corp.netapp.com (10.57.156.124) by VMWEXCHTS04-PRD.hq.netapp.com (10.122.105.32) with Microsoft SMTP Server id 15.0.1076.9; Wed, 10 Jun 2015 13:54:30 -0700 Received: from davros.com (davros.ocarinaproject.vpn.netapp.com [10.63.234.163]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id t5AKsTqP009482; Wed, 10 Jun 2015 13:54:29 -0700 (PDT) From: Anna Schumaker To: , CC: Subject: [PATCH] NFS: Remove unused nfs_rw_ops->rw_release() function Date: Wed, 10 Jun 2015 16:54:28 -0400 Message-ID: <1433969668-1685-1-git-send-email-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.4.2 MIME-Version: 1.0 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 This was only ever set to nfs_writeback_release_common(), a function which is completely empty. Let's just drop this function pointer and simplify the code a bit. Signed-off-by: Anna Schumaker --- fs/nfs/pagelist.c | 2 -- fs/nfs/write.c | 6 ------ include/linux/nfs_page.h | 1 - 3 files changed, 9 deletions(-) diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 282b393..e9953ab 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -690,8 +690,6 @@ static int nfs_pgio_error(struct nfs_pageio_descriptor *desc, static void nfs_pgio_release(void *calldata) { struct nfs_pgio_header *hdr = calldata; - if (hdr->rw_ops->rw_release) - hdr->rw_ops->rw_release(hdr); nfs_pgio_data_destroy(hdr); hdr->completion_ops->completion(hdr); } diff --git a/fs/nfs/write.c b/fs/nfs/write.c index dfc19f1..d0f1f21 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1347,11 +1347,6 @@ void nfs_commit_prepare(struct rpc_task *task, void *calldata) NFS_PROTO(data->inode)->commit_rpc_prepare(task, data); } -static void nfs_writeback_release_common(struct nfs_pgio_header *hdr) -{ - /* do nothing! */ -} - /* * Special version of should_remove_suid() that ignores capabilities. */ @@ -2012,7 +2007,6 @@ static const struct nfs_rw_ops nfs_rw_write_ops = { .rw_mode = FMODE_WRITE, .rw_alloc_header = nfs_writehdr_alloc, .rw_free_header = nfs_writehdr_free, - .rw_release = nfs_writeback_release_common, .rw_done = nfs_writeback_done, .rw_result = nfs_writeback_result, .rw_initiate = nfs_initiate_write, diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 3eb072d..f2f650f 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -67,7 +67,6 @@ struct nfs_rw_ops { const fmode_t rw_mode; struct nfs_pgio_header *(*rw_alloc_header)(void); void (*rw_free_header)(struct nfs_pgio_header *); - void (*rw_release)(struct nfs_pgio_header *); int (*rw_done)(struct rpc_task *, struct nfs_pgio_header *, struct inode *); void (*rw_result)(struct rpc_task *, struct nfs_pgio_header *);