From patchwork Tue Feb 19 00:09:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10819067 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2ABF913BF for ; Tue, 19 Feb 2019 00:13:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 158212BDE4 for ; Tue, 19 Feb 2019 00:13:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A1032BDEC; Tue, 19 Feb 2019 00:13:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A2E7B2BDE4 for ; Tue, 19 Feb 2019 00:13:21 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 65F254E1A7E; Mon, 18 Feb 2019 16:13:21 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id D12AC21F50E for ; Mon, 18 Feb 2019 16:13:18 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0FF21B008; Tue, 19 Feb 2019 00:13:18 +0000 (UTC) From: NeilBrown To: James Simmons , Andreas Dilger , Oleg Drokin Date: Tue, 19 Feb 2019 11:09:05 +1100 Message-ID: <155053494576.24125.8952974091192338899.stgit@noble.brown> In-Reply-To: <155053473693.24125.6976971762921761309.stgit@noble.brown> References: <155053473693.24125.6976971762921761309.stgit@noble.brown> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 18/37] lustre: obdclass: discard lprocfs_single/seq_release X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lustre Development List Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP Neither lprocfs_single_release() or lprocfs_seq_release() add any value to single_release() or seq_release() which they wrap. So just use the base functions and discard the wrapper. Signed-off-by: NeilBrown Reviewed-by: James Simmons --- .../staging/lustre/lustre/include/lprocfs_status.h | 7 ++----- drivers/staging/lustre/lustre/lov/lproc_lov.c | 2 +- .../lustre/lustre/obdclass/lprocfs_status.c | 14 +------------- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h b/drivers/staging/lustre/lustre/include/lprocfs_status.h index d69f395e3d52..8565c28f08ee 100644 --- a/drivers/staging/lustre/lustre/include/lprocfs_status.h +++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h @@ -502,9 +502,6 @@ unsigned long lprocfs_oh_sum(struct obd_histogram *oh); void lprocfs_stats_collect(struct lprocfs_stats *stats, int idx, struct lprocfs_counter *cnt); -int lprocfs_single_release(struct inode *inode, struct file *file); -int lprocfs_seq_release(struct inode *inode, struct file *file); - /* write the name##_seq_show function, call LPROC_SEQ_FOPS_RO for read-only * proc entries; otherwise, you will define name##_seq_write function also for * a read-write proc entry, and then call LPROC_SEQ_SEQ instead. Finally, @@ -521,7 +518,7 @@ static const struct file_operations name##_fops = { \ .read = seq_read, \ .write = custom_seq_write, \ .llseek = seq_lseek, \ - .release = lprocfs_single_release, \ + .release = single_release, \ } #define LPROC_SEQ_FOPS_RO(name) __LPROC_SEQ_FOPS(name, NULL) @@ -563,7 +560,7 @@ static const struct file_operations name##_fops = { \ static const struct file_operations name##_##type##_fops = { \ .open = name##_##type##_open, \ .write = name##_##type##_write, \ - .release = lprocfs_single_release, \ + .release = single_release, \ } struct lustre_attr { diff --git a/drivers/staging/lustre/lustre/lov/lproc_lov.c b/drivers/staging/lustre/lustre/lov/lproc_lov.c index fc53f2386c39..cfb274498d30 100644 --- a/drivers/staging/lustre/lustre/lov/lproc_lov.c +++ b/drivers/staging/lustre/lustre/lov/lproc_lov.c @@ -264,7 +264,7 @@ static const struct file_operations lov_debugfs_target_fops = { .open = lov_target_seq_open, .read = seq_read, .llseek = seq_lseek, - .release = lprocfs_seq_release, + .release = seq_release, }; static struct attribute *lov_attrs[] = { diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index bd24e48f6145..76d298337e95 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -273,18 +273,6 @@ MODULE_PARM_DESC(lprocfs_no_percpu_stats, "Do not alloc percpu data for lprocfs #define MAX_STRING_SIZE 128 -int lprocfs_single_release(struct inode *inode, struct file *file) -{ - return single_release(inode, file); -} -EXPORT_SYMBOL(lprocfs_single_release); - -int lprocfs_seq_release(struct inode *inode, struct file *file) -{ - return seq_release(inode, file); -} -EXPORT_SYMBOL(lprocfs_seq_release); - /* lprocfs API calls */ static const struct file_operations lprocfs_generic_fops = { }; @@ -1331,7 +1319,7 @@ const struct file_operations lprocfs_stats_seq_fops = { .read = seq_read, .write = lprocfs_stats_seq_write, .llseek = seq_lseek, - .release = lprocfs_seq_release, + .release = seq_release, }; EXPORT_SYMBOL_GPL(lprocfs_stats_seq_fops); diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index 25858b8f6cbd..d09bddaf88ba 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -1093,7 +1093,7 @@ void ptlrpc_ldebugfs_register_service(struct dentry *entry, .open = ptlrpc_lprocfs_svc_req_history_open, .read = seq_read, .llseek = seq_lseek, - .release = lprocfs_seq_release, + .release = seq_release, }; ptlrpc_ldebugfs_register(entry, svc->srv_name,