public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] i_version: remount support
@ 2008-10-07 11:30 Mimi Zohar
  2008-10-07 11:48 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Mimi Zohar @ 2008-10-07 11:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mimi Zohar, Mimi Zohar

Add support for remounting a filesystem with the i_version option.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
---
diff --git a/fs/super.c b/fs/super.c
index e931ae9..3758cbe 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -641,6 +641,8 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
 			return retval;
 	}
 	sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK);
+	if (flags & MS_I_VERSION)
+		sb->s_flags |= MS_I_VERSION;
 	if (remount_rw)
 		DQUOT_ON_REMOUNT(sb);
 	return 0;
-- 
1.5.5.1


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

* Re: [RFC PATCH] i_version: remount support
  2008-10-07 11:30 [RFC PATCH] i_version: remount support Mimi Zohar
@ 2008-10-07 11:48 ` Christoph Hellwig
  2008-10-07 16:51   ` Mimi Zohar
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2008-10-07 11:48 UTC (permalink / raw)
  To: Mimi Zohar; +Cc: linux-kernel, Mimi Zohar

On Tue, Oct 07, 2008 at 07:30:48AM -0400, Mimi Zohar wrote:
> Add support for remounting a filesystem with the i_version option.
> 
> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
> ---
> diff --git a/fs/super.c b/fs/super.c
> index e931ae9..3758cbe 100644
> --- a/fs/super.c
> +++ b/fs/super.c
> @@ -641,6 +641,8 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
>  			return retval;
>  	}
>  	sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK);
> +	if (flags & MS_I_VERSION)
> +		sb->s_flags |= MS_I_VERSION;

The proper way would be to add it to MS_RMT_MASK.


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

* Re: [RFC PATCH] i_version: remount support
  2008-10-07 11:48 ` Christoph Hellwig
@ 2008-10-07 16:51   ` Mimi Zohar
  0 siblings, 0 replies; 3+ messages in thread
From: Mimi Zohar @ 2008-10-07 16:51 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-kernel, Mimi Zohar

On Tue, 2008-10-07 at 07:48 -0400, Christoph Hellwig wrote:
> On Tue, Oct 07, 2008 at 07:30:48AM -0400, Mimi Zohar wrote:
> > Add support for remounting a filesystem with the i_version option.
> > 
> > Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
> > ---
> > diff --git a/fs/super.c b/fs/super.c
> > index e931ae9..3758cbe 100644
> > --- a/fs/super.c
> > +++ b/fs/super.c
> > @@ -641,6 +641,8 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
> >  			return retval;
> >  	}
> >  	sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK);
> > +	if (flags & MS_I_VERSION)
> > +		sb->s_flags |= MS_I_VERSION;
> 
> The proper way would be to add it to MS_RMT_MASK.
> 

That works. Here's the replacement patch.

Thanks!

Mimi

Add support for remounting a filesystem with the i_version option.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>

Index: security-testing-2.6/include/linux/fs.h
===================================================================
--- security-testing-2.6.orig/include/linux/fs.h
+++ security-testing-2.6/include/linux/fs.h
@@ -134,7 +134,7 @@ extern int dir_notify_enable;
 /*
  * Superblock flags that can be altered by MS_REMOUNT
  */
-#define MS_RMT_MASK	(MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK)
+#define MS_RMT_MASK	(MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION)
 
 /*
  * Old magic mount flag and mask



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

end of thread, other threads:[~2008-10-07 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 11:30 [RFC PATCH] i_version: remount support Mimi Zohar
2008-10-07 11:48 ` Christoph Hellwig
2008-10-07 16:51   ` Mimi Zohar

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