public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] change inotifyfs magic as the same magic is used for futexfs (v2)
@ 2007-09-24  8:46 Andrey Mirkin
  2007-09-24 15:08 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Mirkin @ 2007-09-24  8:46 UTC (permalink / raw)
  To: John McCutchan, Robert Love, Ingo Molnar, Andrew Morton,
	Randy Dunlap, Jan Engelhardt
  Cc: Linux Kernel Mailing List, devel

From: Andrey Mirkin <major@openvz.org>

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>

----

 fs/inotify_user.c     |    4 +++-
 include/linux/magic.h |    3 +++
 kernel/futex.c        |    3 ++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/fs/inotify_user.c b/fs/inotify_user.c
index 9bf2f6c..5e00933 100644
--- a/fs/inotify_user.c
+++ b/fs/inotify_user.c
@@ -31,6 +31,7 @@ #include <linux/init.h>
 #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 = {
diff --git a/include/linux/futex.h b/include/linux/futex.h
diff --git a/include/linux/inotify.h b/include/linux/inotify.h
diff --git a/include/linux/magic.h b/include/linux/magic.h
index 36cc20d..722d475 100644
--- a/include/linux/magic.h
+++ b/include/linux/magic.h
@@ -38,4 +38,7 @@ #define REISER2FS_JR_SUPER_MAGIC_STRING	
 #define SMB_SUPER_MAGIC		0x517B
 #define USBDEVICE_SUPER_MAGIC	0x9fa2
 
+#define FUTEXFS_SUPER_MAGIC	0xBAD1DEA
+#define INOTIFYFS_SUPER_MAGIC	0x2BAD1DEA
+
 #endif /* __LINUX_MAGIC_H__ */
diff --git a/kernel/futex.c b/kernel/futex.c
index e8935b1..856dfba 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -52,6 +52,7 @@ #include <linux/pagemap.h>
 #include <linux/syscalls.h>
 #include <linux/signal.h>
 #include <linux/module.h>
+#include <linux/magic.h>
 #include <asm/futex.h>
 
 #include "rtmutex_common.h"
@@ -2074,7 +2075,7 @@ static int futexfs_get_sb(struct file_sy
 			  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 = {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] change inotifyfs magic as the same magic is used for futexfs (v2)
  2007-09-24  8:46 [PATCH] change inotifyfs magic as the same magic is used for futexfs (v2) Andrey Mirkin
@ 2007-09-24 15:08 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2007-09-24 15:08 UTC (permalink / raw)
  To: Andrey Mirkin
  Cc: John McCutchan, Robert Love, Ingo Molnar, Andrew Morton,
	Jan Engelhardt, devel

On Mon, 24 Sep 2007 12:46:06 +0400 Andrey Mirkin wrote:

> From: Andrey Mirkin <major@openvz.org>
> 
> 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>

> ----
> 
>  fs/inotify_user.c     |    4 +++-
>  include/linux/magic.h |    3 +++
>  kernel/futex.c        |    3 ++-
>  3 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/inotify_user.c b/fs/inotify_user.c
> index 9bf2f6c..5e00933 100644
> --- a/fs/inotify_user.c
> +++ b/fs/inotify_user.c
> @@ -31,6 +31,7 @@ #include <linux/init.h>
>  #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 = {
> diff --git a/include/linux/futex.h b/include/linux/futex.h
> diff --git a/include/linux/inotify.h b/include/linux/inotify.h
> diff --git a/include/linux/magic.h b/include/linux/magic.h
> index 36cc20d..722d475 100644
> --- a/include/linux/magic.h
> +++ b/include/linux/magic.h
> @@ -38,4 +38,7 @@ #define REISER2FS_JR_SUPER_MAGIC_STRING	
>  #define SMB_SUPER_MAGIC		0x517B
>  #define USBDEVICE_SUPER_MAGIC	0x9fa2
>  
> +#define FUTEXFS_SUPER_MAGIC	0xBAD1DEA
> +#define INOTIFYFS_SUPER_MAGIC	0x2BAD1DEA
> +
>  #endif /* __LINUX_MAGIC_H__ */
> diff --git a/kernel/futex.c b/kernel/futex.c
> index e8935b1..856dfba 100644
> --- a/kernel/futex.c
> +++ b/kernel/futex.c
> @@ -52,6 +52,7 @@ #include <linux/pagemap.h>
>  #include <linux/syscalls.h>
>  #include <linux/signal.h>
>  #include <linux/module.h>
> +#include <linux/magic.h>
>  #include <asm/futex.h>
>  
>  #include "rtmutex_common.h"
> @@ -2074,7 +2075,7 @@ static int futexfs_get_sb(struct file_sy
>  			  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 = {
> -

---
~Randy
Phaedrus says that Quality is about caring.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-24 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-24  8:46 [PATCH] change inotifyfs magic as the same magic is used for futexfs (v2) Andrey Mirkin
2007-09-24 15:08 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox