]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/afs/super.c
mount options: fix afs
[linux-2.6-omap-h63xx.git] / fs / afs / super.c
index b8808b40f82b3c01f35fb37e3c88a67a36775170..36bbce45f44b40248352b433b460a116c7dccfa6 100644 (file)
@@ -27,8 +27,7 @@
 
 #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */
 
-static void afs_i_init_once(void *foo, struct kmem_cache *cachep,
-                           unsigned long flags);
+static void afs_i_init_once(struct kmem_cache *cachep, void *foo);
 static int afs_get_sb(struct file_system_type *fs_type,
                      int flags, const char *dev_name,
                      void *data, struct vfsmount *mnt);
@@ -53,6 +52,7 @@ static const struct super_operations afs_super_ops = {
        .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;
@@ -358,6 +358,7 @@ static int afs_get_sb(struct file_system_type *fs_type,
        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);
@@ -409,9 +410,11 @@ static int afs_get_sb(struct file_system_type *fs_type,
                        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);
        }
 
@@ -425,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;
 }
@@ -446,8 +450,7 @@ static void afs_put_super(struct super_block *sb)
 /*
  * initialise an inode cache slab element prior to any use
  */
-static void afs_i_init_once(void *_vnode, struct kmem_cache *cachep,
-                           unsigned long flags)
+static void afs_i_init_once(struct kmem_cache *cachep, void *_vnode)
 {
        struct afs_vnode *vnode = _vnode;