Skip to contentSkip to conversation

namespaces: get_sb_ns does not require CONFIG_BLOCK

PATCH In review Serge E. Hallyn 1 participant 2 messages Feb 26, 2009 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 namespaces: get_sb_ns does not require CONFIG_BLOCK

So move it outside of the CONFIG_BLOCK ifdef in fs/super.c.

---
 fs/super.c |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)
fs/super.c +15 -13
index 1a37b58..5182044 100644
@@ -761,19 +761,6 @@ void kill_litter_super(struct super_block *sb)
 
 EXPORT_SYMBOL(kill_litter_super);
 
-#ifdef CONFIG_BLOCK
-static int set_bdev_super(struct super_block *s, void *data)
-{
-	s->s_bdev = data;
-	s->s_dev = s->s_bdev->bd_dev;
-	return 0;
-}
-
-static int test_bdev_super(struct super_block *s, void *data)
-{
-	return (void *)s->s_bdev == data;
-}
-
 static int ns_test_super(struct super_block *sb, void *data)
 {
 	return sb->s_fs_info == data;
@@ -812,6 +799,21 @@ int get_sb_ns(struct file_system_type *fs_type, int flags, void *data,
 	return 0;
 }
 
+EXPORT_SYMBOL(get_sb_ns);
+
+#ifdef CONFIG_BLOCK
+static int set_bdev_super(struct super_block *s, void *data)
+{
+	s->s_bdev = data;
+	s->s_dev = s->s_bdev->bd_dev;
+	return 0;
+}
+
+static int test_bdev_super(struct super_block *s, void *data)
+{
+	return (void *)s->s_bdev == data;
+}
+
 int get_sb_bdev(struct file_system_type *fs_type,
 	int flags, const char *dev_name, void *data,
 	int (*fill_super)(struct super_block *, void *, int),
Signature · 1 line
1.5.4.3
#1 lore raw
Quoted 1 line · Serge E. Hallyn

So move it outside of the CONFIG_BLOCK ifdef in fs/super.c.

Sorry, Andrew. I meant to add the following to the description:

Without this patch, compilation breaks on fs/proc/proc_net.c if CONFIG_BLOCK=n.

thanks,
-serge