change inotifyfs magic as the same magic is used for futexfs
PATCH 1/1 change inotifyfs magic as the same magic is used for futexfs
From: Andrey Mirkin <[email protected]>
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.
----
fs/inotify_user.c +1 -1
@@ -684,7 +684,7 @@ 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_MAGIC, mnt); } static struct file_system_type inotify_fs_type = {
include/linux/futex.h +2 -0
@@ -3,6 +3,8 @@ #define _LINUX_FUTEX_H#include <linux/sched.h> +#define FUTEXFS_MAGIC 0xBAD1DEA +union ktime ;/* Second argument to futex syscall */
include/linux/inotify.h +2 -0
@@ -9,6 +9,8 @@ #define _LINUX_INOTIFY_H#include <linux/types.h> +#define INOTIFYFS_MAGIC 0x2BAD1DEA +/* * struct inotify_event - structure read from the inotify device for each
event
*
kernel/futex.c +1 -1
@@ -2074,7 +2074,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_MAGIC, mnt); } static struct file_system_type futex_fs_type = {
Quoted 7 lines · On Fri, 21 Sep 2007 17:35:43 +0400 Andrey Mirkin wrote:
From: Andrey Mirkin <[email protected]>
Right now futexfs and inotifyfs have one magic
0xBAD1DEA, that looks a little bit confusing.
Use0xBAD1DEAas magic for futexfs and0x2BAD1DEAas magic for inotifyfs.Signed-off-by Andrey Mirkin <[email protected]>
A 'diffstat -p 1 -w 70' would be helpful so we can see which files are touched.
Please add these magic numbers to include/linux/magic.h so that they are clearly visible and conflicts can be seen easier, then #include <linux/magic.h> in these source files.
Quoted 47 lines
----
fs/inotify_user.c +1
-1@@ -684,7 +684,7 @@ 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_MAGIC, mnt); } static struct file_system_type inotify_fs_type = {include/linux/futex.h +2
-0@@ -3,6 +3,8 @@ #define _LINUX_FUTEX_H#include <linux/sched.h> +#define FUTEXFS_MAGIC 0xBAD1DEA +union ktime ;/* Second argument to futex syscall */ include/linux/inotify.h +2
-0@@ -9,6 +9,8 @@ #define _LINUX_INOTIFY_H#include <linux/types.h> +#define INOTIFYFS_MAGIC 0x2BAD1DEA +/* * struct inotify_event - structure read from the inotify device for each event
*kernel/futex.c +0
-0
kernel/futex.c static int futexfs_get_sb(struct file_sy
Quoted 9 lines
kernel/futex.c +1
-2@@ -2074,7 +2074,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_MAGIC, mnt); } static struct file_system_type futex_fs_type = { -
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 8 lines · Randy Dunlap
Quoted 6 lines · On Fri, 21 Sep 2007 17:35:43 +0400 Andrey Mirkin wrote:
From: Andrey Mirkin <[email protected]>
Right now futexfs and inotifyfs have one magic
0xBAD1DEA, that looks a little bit confusing.
Use0xBAD1DEAas magic for futexfs and0x2BAD1DEAas magic for inotifyfs.
Quoted 8 lines
Quoted 1 line
Signed-off-by Andrey Mirkin <[email protected]>A 'diffstat -p 1 -w 70' would be helpful so we can see which files are touched.
Please add these magic numbers to
include/linux/magic.hso that they are clearly visible and conflicts can be seen easier, then #include <linux/magic.h> in these source files.
Also because userspace may want these magics too.