2008-01-24 19:44:09

by Miklos Szeredi

[permalink] [raw]
Subject: [patch 05/26] mount options: fix afs

From: Miklos Szeredi <[email protected]>

Add a .show_options super operation to afs.

Use generic_show_options() and save the complete option string in
afs_get_sb().

Signed-off-by: Miklos Szeredi <[email protected]>
---

Index: linux/fs/afs/super.c
===================================================================
--- linux.orig/fs/afs/super.c 2008-01-24 11:42:44.000000000 +0100
+++ linux/fs/afs/super.c 2008-01-24 12:05:50.000000000 +0100
@@ -52,6 +52,7 @@ static const struct super_operations afs
.clear_inode = afs_clear_inode,
.umount_begin = afs_umount_begin,
.put_super = afs_put_super,
+ .show_options = generic_show_options,
};

static struct kmem_cache *afs_inode_cachep;
@@ -357,6 +358,7 @@ static int afs_get_sb(struct file_system
struct super_block *sb;
struct afs_volume *vol;
struct key *key;
+ char *new_opts = kstrdup(options, GFP_KERNEL);
int ret;

_enter(",,%s,%p", dev_name, options);
@@ -408,9 +410,11 @@ static int afs_get_sb(struct file_system
deactivate_super(sb);
goto error;
}
+ sb->s_options = new_opts;
sb->s_flags |= MS_ACTIVE;
} else {
_debug("reuse");
+ kfree(new_opts);
ASSERTCMP(sb->s_flags, &, MS_ACTIVE);
}

@@ -424,6 +428,7 @@ error:
afs_put_volume(params.volume);
afs_put_cell(params.cell);
key_put(params.key);
+ kfree(new_opts);
_leave(" = %d", ret);
return ret;
}

--


2008-01-29 00:19:48

by David Howells

[permalink] [raw]
Subject: Re: [patch 05/26] mount options: fix afs

Miklos Szeredi <[email protected]> wrote:

> Add a .show_options super operation to afs.
>
> Use generic_show_options() and save the complete option string in
> afs_get_sb().

Sounds reasonable, but I can't test it till I get back from LCA.

David