From patchwork Fri Jan 26 19:07:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Brandenburg X-Patchwork-Id: 10186837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1498B60383 for ; Fri, 26 Jan 2018 19:08:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0581229B1A for ; Fri, 26 Jan 2018 19:08:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED8EE29D85; Fri, 26 Jan 2018 19:08:25 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8968829B1A for ; Fri, 26 Jan 2018 19:08:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752871AbeAZTHx (ORCPT ); Fri, 26 Jan 2018 14:07:53 -0500 Received: from mail-yw0-f193.google.com ([209.85.161.193]:36193 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752529AbeAZTHt (ORCPT ); Fri, 26 Jan 2018 14:07:49 -0500 Received: by mail-yw0-f193.google.com with SMTP id q6so555264ywg.3 for ; Fri, 26 Jan 2018 11:07:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnibond-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=l5SaM/yeuoVJg+gNtpgJzbBjvl3cUS3ZSn/8/HLhdLg=; b=1ytMc4o/ks6owThX6FiOV1ZTExsURDNkr3PwrZqhWRV7jvfDxBfby9QcnJvs8WQ98u TcoHB6C9wFCEcDy3dVaZH/wpkUgYIL/aERzWPran9VnmaNVDe2BOygacFjnpg07AGGJw pnaEnntfLpDJMEUFJ+5dX3vWKsGHLMwrCyMcplmm1DI632GWedK4/NoPEY3qLFlMXCvv Q6dntnjeRChkesDOCavCULWBEK+gisyL8+nd/bVfvpGyZofiL4Gvb0qEW4uhwrhDssop Px/mt+lTXWJ7lKmADK7vHIQlyOImh/tVBIh0kqtH4pCPIuKWDXGqIBSme6NpMWz5GWJn pDHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=l5SaM/yeuoVJg+gNtpgJzbBjvl3cUS3ZSn/8/HLhdLg=; b=fSl/+61uN+6HGlrbd49ho6U4apBqAH3BSO1uuFuFxHq+OngYDFZ+xRlOKIOQymAi1I 7sbuY/NF77pCW7QAkYT9jU1+iUrk7b4X+pARATaFZiYe21eCBBV+Rfjhi79F2ev7f+SS wLcKykY1trlZU3pjIbK21+jViAI7EMY+zPo4AhXfiqgZ/GNG/ZWIaaSHkVnaDGUmFpxn uhoth7fV9Klr/TX3I6rmblOhXH4gtuNZV9lQ7QEhwE8CDdTL/jubPAx7Z3fkAunCl6M8 eZCg5iy0tqYoC+Gvb1bbjBJYt3FF4IfJsrN9ouZfF3JUynL/SPjF03Y3qCMVB+TFtFSP ZpJA== X-Gm-Message-State: AKwxytfGRlKeGbwfXEPzoYh5FFqbz+IBy81WJaev7MlhkoUesHiozXD3 Patkkd546H0NfZVruSGihwcWsg== X-Google-Smtp-Source: AH8x2240rqM7ar8uS9dHX+Apc9kYjK21tKcRv34UdVvQgcKKdjyd9lX96JEOyQajItNBF+f5vS4lKg== X-Received: by 10.13.229.198 with SMTP id o189mr12016011ywe.159.1516993668905; Fri, 26 Jan 2018 11:07:48 -0800 (PST) Received: from stumphouse.sysblue.org ([24.31.12.185]) by smtp.gmail.com with ESMTPSA id z30sm2283354ywj.15.2018.01.26.11.07.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jan 2018 11:07:47 -0800 (PST) From: Martin Brandenburg To: hubcap@omnibond.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, devel@lists.orangefs.org Cc: Martin Brandenburg Subject: [PATCH 5/7] ornagefs: make several *_operations structs static Date: Fri, 26 Jan 2018 14:07:15 -0500 Message-Id: <20180126190717.11075-6-martin@omnibond.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180126190717.11075-1-martin@omnibond.com> References: <20180126190717.11075-1-martin@omnibond.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Martin Brandenburg --- fs/orangefs/devorangefs-req.c | 52 +++++++++++++++++++++---------------------- fs/orangefs/inode.c | 4 ++-- fs/orangefs/orangefs-kernel.h | 3 --- 3 files changed, 28 insertions(+), 31 deletions(-) diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c index c584ad8d023c..eea83603e3dd 100644 --- a/fs/orangefs/devorangefs-req.c +++ b/fs/orangefs/devorangefs-req.c @@ -779,6 +779,32 @@ static long orangefs_devreq_compat_ioctl(struct file *filp, unsigned int cmd, #endif /* CONFIG_COMPAT is in .config */ +static unsigned int orangefs_devreq_poll(struct file *file, + struct poll_table_struct *poll_table) +{ + int poll_revent_mask = 0; + + poll_wait(file, &orangefs_request_list_waitq, poll_table); + + if (!list_empty(&orangefs_request_list)) + poll_revent_mask |= POLL_IN; + return poll_revent_mask; +} + +static const struct file_operations orangefs_devreq_file_operations = { + .owner = THIS_MODULE, + .read = orangefs_devreq_read, + .write_iter = orangefs_devreq_write_iter, + .open = orangefs_devreq_open, + .release = orangefs_devreq_release, + .unlocked_ioctl = orangefs_devreq_ioctl, + +#ifdef CONFIG_COMPAT /* CONFIG_COMPAT is in .config */ + .compat_ioctl = orangefs_devreq_compat_ioctl, +#endif + .poll = orangefs_devreq_poll +}; + /* the assigned character device major number */ static int orangefs_dev_major; @@ -814,29 +840,3 @@ void orangefs_dev_cleanup(void) "*** /dev/%s character device unregistered ***\n", ORANGEFS_REQDEVICE_NAME); } - -static unsigned int orangefs_devreq_poll(struct file *file, - struct poll_table_struct *poll_table) -{ - int poll_revent_mask = 0; - - poll_wait(file, &orangefs_request_list_waitq, poll_table); - - if (!list_empty(&orangefs_request_list)) - poll_revent_mask |= POLL_IN; - return poll_revent_mask; -} - -const struct file_operations orangefs_devreq_file_operations = { - .owner = THIS_MODULE, - .read = orangefs_devreq_read, - .write_iter = orangefs_devreq_write_iter, - .open = orangefs_devreq_open, - .release = orangefs_devreq_release, - .unlocked_ioctl = orangefs_devreq_ioctl, - -#ifdef CONFIG_COMPAT /* CONFIG_COMPAT is in .config */ - .compat_ioctl = orangefs_devreq_compat_ioctl, -#endif - .poll = orangefs_devreq_poll -}; diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index fe1d705ad91f..79c61da8b1bc 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -138,7 +138,7 @@ static ssize_t orangefs_direct_IO(struct kiocb *iocb, } /** ORANGEFS2 implementation of address space operations */ -const struct address_space_operations orangefs_address_operations = { +static const struct address_space_operations orangefs_address_operations = { .readpage = orangefs_readpage, .readpages = orangefs_readpages, .invalidatepage = orangefs_invalidatepage, @@ -307,7 +307,7 @@ int orangefs_update_time(struct inode *inode, struct timespec *time, int flags) } /* ORANGEDS2 implementation of VFS inode operations for files */ -const struct inode_operations orangefs_file_inode_operations = { +static const struct inode_operations orangefs_file_inode_operations = { .get_acl = orangefs_get_acl, .set_acl = orangefs_set_acl, .setattr = orangefs_setattr, diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h index eebbaece85ef..f49d53de8901 100644 --- a/fs/orangefs/orangefs-kernel.h +++ b/fs/orangefs/orangefs-kernel.h @@ -487,14 +487,11 @@ extern struct list_head *orangefs_htable_ops_in_progress; extern spinlock_t orangefs_htable_ops_in_progress_lock; extern int hash_table_size; -extern const struct address_space_operations orangefs_address_operations; -extern const struct inode_operations orangefs_file_inode_operations; extern const struct file_operations orangefs_file_operations; extern const struct inode_operations orangefs_symlink_inode_operations; extern const struct inode_operations orangefs_dir_inode_operations; extern const struct file_operations orangefs_dir_operations; extern const struct dentry_operations orangefs_dentry_operations; -extern const struct file_operations orangefs_devreq_file_operations; extern wait_queue_head_t orangefs_bufmap_init_waitq;