Commit 969729d5 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Linus Torvalds

mount options: fix afs

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: default avatarMiklos Szeredi <mszeredi@suse.cz>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e9b3961b
...@@ -52,6 +52,7 @@ static const struct super_operations afs_super_ops = { ...@@ -52,6 +52,7 @@ static const struct super_operations afs_super_ops = {
.clear_inode = afs_clear_inode, .clear_inode = afs_clear_inode,
.umount_begin = afs_umount_begin, .umount_begin = afs_umount_begin,
.put_super = afs_put_super, .put_super = afs_put_super,
.show_options = generic_show_options,
}; };
static struct kmem_cache *afs_inode_cachep; static struct kmem_cache *afs_inode_cachep;
...@@ -357,6 +358,7 @@ static int afs_get_sb(struct file_system_type *fs_type, ...@@ -357,6 +358,7 @@ static int afs_get_sb(struct file_system_type *fs_type,
struct super_block *sb; struct super_block *sb;
struct afs_volume *vol; struct afs_volume *vol;
struct key *key; struct key *key;
char *new_opts = kstrdup(options, GFP_KERNEL);
int ret; int ret;
_enter(",,%s,%p", dev_name, options); _enter(",,%s,%p", dev_name, options);
...@@ -408,9 +410,11 @@ static int afs_get_sb(struct file_system_type *fs_type, ...@@ -408,9 +410,11 @@ static int afs_get_sb(struct file_system_type *fs_type,
deactivate_super(sb); deactivate_super(sb);
goto error; goto error;
} }
sb->s_options = new_opts;
sb->s_flags |= MS_ACTIVE; sb->s_flags |= MS_ACTIVE;
} else { } else {
_debug("reuse"); _debug("reuse");
kfree(new_opts);
ASSERTCMP(sb->s_flags, &, MS_ACTIVE); ASSERTCMP(sb->s_flags, &, MS_ACTIVE);
} }
...@@ -424,6 +428,7 @@ error: ...@@ -424,6 +428,7 @@ error:
afs_put_volume(params.volume); afs_put_volume(params.volume);
afs_put_cell(params.cell); afs_put_cell(params.cell);
key_put(params.key); key_put(params.key);
kfree(new_opts);
_leave(" = %d", ret); _leave(" = %d", ret);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment