2007-05-05 20:18:31

by Josef 'Jeff' Sipek

[permalink] [raw]
Subject: [GIT PULL -mm] Unionfs updates

The following patches (also available though the git tree) fix few small
bugs in Unionfs.

You can pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jsipek/unionfs.git

to receive the following:

Adrian Brunyate (2):
Unionfs: Accept MS_SILENT during remount
Unionfs: Check remount options for being NULL

Adrian Bunk (1):
fix unionfs compilation

fs/unionfs/super.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)

Josef 'Jeff' Sipek.

[email protected]



2007-05-05 20:18:35

by Josef 'Jeff' Sipek

[permalink] [raw]
Subject: [PATCH 2/3] Unionfs: Check remount options for being NULL

From: Adrian Brunyate <[email protected]>

Signed-off-by: Adrian Brunyate <[email protected]>
Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
---
fs/unionfs/super.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index ee12d03..02c0cc8 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -442,7 +442,7 @@ static int unionfs_remount_fs(struct super_block *sb, int *flags,
* the union to a "ro" or "rw" and the VFS took care of it. So
* nothing to do and we're done.
*/
- if (options[0] == '\0')
+ if (!options || options[0] == '\0')
goto out_error;

/*
--
1.5.0.3.1043.g4342

2007-05-05 20:18:57

by Josef 'Jeff' Sipek

[permalink] [raw]
Subject: [PATCH 1/3] Unionfs: Accept MS_SILENT during remount

From: Adrian Brunyate <[email protected]>

[jsipek: whitespace cleanup]
Signed-off-by: Adrian Brunyate <[email protected]>
Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
---
fs/unionfs/super.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index e6a6cc1..ee12d03 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -425,11 +425,12 @@ static int unionfs_remount_fs(struct super_block *sb, int *flags,
unionfs_write_lock(sb);

/*
- * The VFS will take care of "ro" and "rw" flags, so anything else
- * is an error. So we need to check if any other flags may have
- * been passed (none are allowed/supported as of now).
+ * The VFS will take care of "ro" and "rw" flags, and we can safely
+ * ignore MS_SILENT, but anything else left over is an error. So we
+ * need to check if any other flags may have been passed (none are
+ * allowed/supported as of now).
*/
- if ((*flags & ~MS_RDONLY) != 0) {
+ if ((*flags & ~(MS_RDONLY | MS_SILENT)) != 0) {
printk(KERN_WARNING
"unionfs: remount flags 0x%x unsupported\n", *flags);
err = -EINVAL;
@@ -731,7 +732,8 @@ out_no_change:
i = atomic_inc_return(&UNIONFS_SB(sb)->generation);
atomic_set(&UNIONFS_D(sb->s_root)->generation, i);
atomic_set(&UNIONFS_I(sb->s_root->d_inode)->generation, i);
- printk("unionfs: new generation number %d\n", i);
+ if (!(*flags & MS_SILENT))
+ printk("unionfs: new generation number %d\n", i);
err = 0; /* reset to success */

/*
--
1.5.0.3.1043.g4342

2007-05-05 20:21:47

by Josef 'Jeff' Sipek

[permalink] [raw]
Subject: [PATCH 3/3] [PATCH] fix unionfs compilation

From: Adrian Bunk <[email protected]>

On Sat, May 05, 2007 at 01:49:55AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.21-rc7-mm2:
>...
> git-unionfs.patch
>...
> git trees
>...

<-- snip -->

...
CC fs/unionfs/super.o
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/fs/unionfs/super.c: In function ‘init_once’:
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/fs/unionfs/super.c:822: error: ‘SLAB_CTOR_VERIFY’ undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/fs/unionfs/super.c:822: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/fs/unionfs/super.c:822: error: for each function it appears in.)
make[3]: *** [fs/unionfs/super.o] Error 1

<-- snip -->

Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
---
fs/unionfs/super.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index 02c0cc8..af5a1c5 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -821,8 +821,7 @@ static void init_once(void *v, struct kmem_cache * cachep, unsigned long flags)
{
struct unionfs_inode_info *i = v;

- if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) ==
- SLAB_CTOR_CONSTRUCTOR)
+ if (flags & SLAB_CTOR_CONSTRUCTOR)
inode_init_once(&i->vfs_inode);
}

--
1.5.0.3.1043.g4342