mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wedgwood <cw@f00f.org>
To: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] change {get,put}_filesystem prototypes to static inlines
Date: Wed, 20 Oct 2004 02:47:47 -0700	[thread overview]
Message-ID: <20041020094747.GA2102@taniwha.stupidest.org> (raw)

Al,

Any objections/comments to something like this?



Remove unneeded get_fs_type prototype.  Move get_filesystem and
put_filesystem to fs.h and make them static inline.

Signed-off-by: cw@f00f.org


 fs/filesystems.c   |   11 -----------
 fs/super.c         |    5 -----
 include/linux/fs.h |   12 ++++++++++++
 3 files changed, 12 insertions(+), 16 deletions(-)


===== fs/filesystems.c 1.19 vs edited =====
--- 1.19/fs/filesystems.c	2004-10-18 22:26:38 -07:00
+++ edited/fs/filesystems.c	2004-10-20 02:40:35 -07:00
@@ -30,17 +30,6 @@
 static struct file_system_type *file_systems;
 static rwlock_t file_systems_lock = RW_LOCK_UNLOCKED;
 
-/* WARNING: This can be used only if we _already_ own a reference */
-void get_filesystem(struct file_system_type *fs)
-{
-	__module_get(fs->owner);
-}
-
-void put_filesystem(struct file_system_type *fs)
-{
-	module_put(fs->owner);
-}
-
 static struct file_system_type **find_filesystem(const char *name)
 {
 	struct file_system_type **p;
===== fs/super.c 1.125 vs edited =====
--- 1.125/fs/super.c	2004-10-19 08:00:43 -07:00
+++ edited/fs/super.c	2004-10-20 02:40:32 -07:00
@@ -39,11 +39,6 @@
 #include <linux/kobject.h>
 #include <asm/uaccess.h>
 
-
-void get_filesystem(struct file_system_type *fs);
-void put_filesystem(struct file_system_type *fs);
-struct file_system_type *get_fs_type(const char *name);
-
 LIST_HEAD(super_blocks);
 spinlock_t sb_lock = SPIN_LOCK_UNLOCKED;
 
===== include/linux/fs.h 1.352 vs edited =====
x--- 1.352/include/linux/fs.h	2004-10-19 02:40:29 -07:00
+++ edited/include/linux/fs.h	2004-10-20 02:40:35 -07:00
@@ -7,6 +7,7 @@
  */
 
 #include <linux/config.h>
+#include <linux/module.h>
 #include <linux/linkage.h>
 #include <linux/limits.h>
 #include <linux/wait.h>
@@ -1537,6 +1538,17 @@
 extern int vfs_stat(char __user *, struct kstat *);
 extern int vfs_lstat(char __user *, struct kstat *);
 extern int vfs_fstat(unsigned int, struct kstat *);
+
+/* WARNING: This can be used only if we _already_ own a reference */
+static inline void get_filesystem(struct file_system_type *fs)
+{
+	__module_get(fs->owner);
+}
+
+static inline void put_filesystem(struct file_system_type *fs)
+{
+	module_put(fs->owner);
+}
 
 extern struct file_system_type *get_fs_type(const char *name);
 extern struct super_block *get_super(struct block_device *);

                 reply	other threads:[~2004-10-20  9:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041020094747.GA2102@taniwha.stupidest.org \
    --to=cw@f00f.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®