change inotifyfs magic as the same magic is used for futexfs
authorAndrey Mirkin <major@openvz.org>
Wed, 17 Oct 2007 06:30:13 +0000 (23:30 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:43:00 +0000 (08:43 -0700)
Right now futexfs and inotifyfs have one magic 0xBAD1DEA, that looks a
little bit confusing.  Use 0xBAD1DEA as magic for futexfs and 0x2BAD1DEA as
magic for inotifyfs.

Signed-off-by: Andrey Mirkin <major@openvz.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/inotify_user.c
include/linux/magic.h
kernel/futex.c

index 9bf2f6c09df64932bba2f88e838a240f7e4e2eea..5e009331c01ff5fbe1a453f735e906e54645368f 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/list.h>
 #include <linux/inotify.h>
 #include <linux/syscalls.h>
+#include <linux/magic.h>
 
 #include <asm/ioctls.h>
 
@@ -684,7 +685,8 @@ static int
 inotify_get_sb(struct file_system_type *fs_type, int flags,
               const char *dev_name, void *data, struct vfsmount *mnt)
 {
-       return get_sb_pseudo(fs_type, "inotify", NULL, 0xBAD1DEA, mnt);
+       return get_sb_pseudo(fs_type, "inotify", NULL,
+                       INOTIFYFS_SUPER_MAGIC, mnt);
 }
 
 static struct file_system_type inotify_fs_type = {
index 36cc20dfd1427398daaad3a7b2fc0faeaaa04e93..722d4755060f7deee6f403ee7a5aafed5a914c25 100644 (file)
@@ -38,4 +38,7 @@
 #define SMB_SUPER_MAGIC                0x517B
 #define USBDEVICE_SUPER_MAGIC  0x9fa2
 
+#define FUTEXFS_SUPER_MAGIC    0xBAD1DEA
+#define INOTIFYFS_SUPER_MAGIC  0x2BAD1DEA
+
 #endif /* __LINUX_MAGIC_H__ */
index fcc94e7b40864afcb72170f19d832f8117e517fc..d725676d84f3580813161678394bc9220630af82 100644 (file)
@@ -52,6 +52,7 @@
 #include <linux/syscalls.h>
 #include <linux/signal.h>
 #include <linux/module.h>
+#include <linux/magic.h>
 #include <asm/futex.h>
 
 #include "rtmutex_common.h"
@@ -2080,7 +2081,7 @@ static int futexfs_get_sb(struct file_system_type *fs_type,
                          int flags, const char *dev_name, void *data,
                          struct vfsmount *mnt)
 {
-       return get_sb_pseudo(fs_type, "futex", NULL, 0xBAD1DEA, mnt);
+       return get_sb_pseudo(fs_type, "futex", NULL, FUTEXFS_SUPER_MAGIC, mnt);
 }
 
 static struct file_system_type futex_fs_type = {