aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2008-02-08 07:21:37 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:39 -0500
commit969729d56ef2c8b709844bc0071805f86dfbd2f9 (patch)
treea527f19a96b31774d9344e52a9f2b98b364f8839 /fs
parente9b3961b66bb1e93762895d809be074ea109c77c (diff)
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: Miklos Szeredi <mszeredi@suse.cz> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/afs/super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 4b2558c42213..36bbce45f44b 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -52,6 +52,7 @@ static const struct super_operations afs_super_ops = {
52 .clear_inode = afs_clear_inode, 52 .clear_inode = afs_clear_inode,
53 .umount_begin = afs_umount_begin, 53 .umount_begin = afs_umount_begin,
54 .put_super = afs_put_super, 54 .put_super = afs_put_super,
55 .show_options = generic_show_options,
55}; 56};
56 57
57static struct kmem_cache *afs_inode_cachep; 58static struct kmem_cache *afs_inode_cachep;
@@ -357,6 +358,7 @@ static int afs_get_sb(struct file_system_type *fs_type,
357 struct super_block *sb; 358 struct super_block *sb;
358 struct afs_volume *vol; 359 struct afs_volume *vol;
359 struct key *key; 360 struct key *key;
361 char *new_opts = kstrdup(options, GFP_KERNEL);
360 int ret; 362 int ret;
361 363
362 _enter(",,%s,%p", dev_name, options); 364 _enter(",,%s,%p", dev_name, options);
@@ -408,9 +410,11 @@ static int afs_get_sb(struct file_system_type *fs_type,
408 deactivate_super(sb); 410 deactivate_super(sb);
409 goto error; 411 goto error;
410 } 412 }
413 sb->s_options = new_opts;
411 sb->s_flags |= MS_ACTIVE; 414 sb->s_flags |= MS_ACTIVE;
412 } else { 415 } else {
413 _debug("reuse"); 416 _debug("reuse");
417 kfree(new_opts);
414 ASSERTCMP(sb->s_flags, &, MS_ACTIVE); 418 ASSERTCMP(sb->s_flags, &, MS_ACTIVE);
415 } 419 }
416 420
@@ -424,6 +428,7 @@ error:
424 afs_put_volume(params.volume); 428 afs_put_volume(params.volume);
425 afs_put_cell(params.cell); 429 afs_put_cell(params.cell);
426 key_put(params.key); 430 key_put(params.key);
431 kfree(new_opts);
427 _leave(" = %d", ret); 432 _leave(" = %d", ret);
428 return ret; 433 return ret;
429} 434}