mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Andrey Mirkin <amirkin@sw.ru>
Cc: John McCutchan <ttb@tentacle.dhs.org>,
	Robert Love <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Andrew Morton <akpm@osdl.org>,
	devel@openvz.org
Subject: Re: [PATCH] change inotifyfs magic as the same magic is used for futexfs
Date: Fri, 21 Sep 2007 08:53:13 -0700	[thread overview]
Message-ID: <20070921085313.39717ba4.randy.dunlap@oracle.com> (raw)
In-Reply-To: <200709211735.44814.amirkin@sw.ru>

On Fri, 21 Sep 2007 17:35:43 +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>

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.


> ----
> 
> diff --git a/fs/inotify_user.c b/fs/inotify_user.c
> index 9bf2f6c..9b1a195 100644
> --- a/fs/inotify_user.c
> +++ b/fs/inotify_user.c
> @@ -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 = {
> diff --git a/include/linux/futex.h b/include/linux/futex.h
> index 9965035..89611cc 100644
> --- a/include/linux/futex.h
> +++ b/include/linux/futex.h
> @@ -3,6 +3,8 @@ #define _LINUX_FUTEX_H
>  
>  #include <linux/sched.h>
>  
> +#define FUTEXFS_MAGIC 0xBAD1DEA
> +
>  union ktime;
>  
>  /* Second argument to futex syscall */
> diff --git a/include/linux/inotify.h b/include/linux/inotify.h
> index d4f48c6..2579c4d 100644
> --- a/include/linux/inotify.h
> +++ b/include/linux/inotify.h
> @@ -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
>   *
> diff --git a/kernel/futex.c b/kernel/futex.c
> index e8935b1..6b57355 100644
> --- a/kernel/futex.c
> +++ b/kernel/futex.c
> @@ -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 ***

  reply	other threads:[~2007-09-21 15:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-21 13:35 Andrey Mirkin
2007-09-21 15:53 ` Randy Dunlap [this message]
2007-09-22  9:19   ` Jan Engelhardt

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=20070921085313.39717ba4.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=akpm@osdl.org \
    --cc=amirkin@sw.ru \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=ttb@tentacle.dhs.org \
    /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®