From patchwork Fri Jul 10 20:58:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 6768701 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 31997C05AC for ; Fri, 10 Jul 2015 21:00:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 57EF4207A1 for ; Fri, 10 Jul 2015 21:00:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B599520787 for ; Fri, 10 Jul 2015 21:00:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933309AbbGJVAB (ORCPT ); Fri, 10 Jul 2015 17:00:01 -0400 Received: from mx141.netapp.com ([216.240.21.12]:62516 "EHLO mx141.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932582AbbGJU77 (ORCPT ); Fri, 10 Jul 2015 16:59:59 -0400 X-IronPort-AV: E=Sophos;i="5.15,449,1432623600"; d="scan'208";a="55889179" Received: from vmwexchts04-prd.hq.netapp.com ([10.122.105.32]) by mx141-out.netapp.com with ESMTP; 10 Jul 2015 13:59:58 -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; Fri, 10 Jul 2015 13:59:55 -0700 Received: from davros.com ([10.63.224.59]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id t6AKwW4Q005098; Fri, 10 Jul 2015 13:59:55 -0700 (PDT) From: Anna Schumaker To: , CC: Subject: [PATCH 9/9] NFS: Remove nfs_release() Date: Fri, 10 Jul 2015 16:58:17 -0400 Message-ID: <1436561897-8051-10-git-send-email-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1436561897-8051-1-git-send-email-Anna.Schumaker@Netapp.com> References: <1436561897-8051-1-git-send-email-Anna.Schumaker@Netapp.com> 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=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 And call nfs_file_clear_open_context() directly. This makes it obvious that nfs_file_release() will always return 0. Signed-off-by: Anna Schumaker Reviewed-by: Christoph Hellwig --- fs/nfs/file.c | 3 ++- fs/nfs/inode.c | 8 +------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/fs/nfs/file.c b/fs/nfs/file.c index cc4fa1e..7538a85 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -82,7 +82,8 @@ nfs_file_release(struct inode *inode, struct file *filp) dprintk("NFS: release(%pD2)\n", filp); nfs_inc_stats(inode, NFSIOS_VFSRELEASE); - return nfs_release(inode, filp); + nfs_file_clear_open_context(filp); + return 0; } EXPORT_SYMBOL_GPL(nfs_file_release); diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index b77b328..a0d195f 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -887,7 +887,7 @@ struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_c return ctx; } -static void nfs_file_clear_open_context(struct file *filp) +void nfs_file_clear_open_context(struct file *filp) { struct nfs_open_context *ctx = nfs_file_open_context(filp); @@ -918,12 +918,6 @@ int nfs_open(struct inode *inode, struct file *filp) return 0; } -int nfs_release(struct inode *inode, struct file *filp) -{ - nfs_file_clear_open_context(filp); - return 0; -} - /* * This function is called whenever some part of NFS notices that * the cached attributes have to be refreshed.