X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fafs%2Fsuper.c;h=67d1f5c819eccc08936e9c11ad0b0bef58c7118f;hb=e0ff8aa1acd079b70e796571917ae0449b7c465b;hp=bcf81d358df0bbc0b0635e2113472664513d75c1;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/afs/super.c b/fs/afs/super.c index bcf81d358..67d1f5c81 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c @@ -38,9 +38,9 @@ struct afs_mount_params { static void afs_i_init_once(void *foo, kmem_cache_t *cachep, unsigned long flags); -static struct super_block *afs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data); +static int afs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data, struct vfsmount *mnt); static struct inode *afs_alloc_inode(struct super_block *sb); @@ -48,7 +48,7 @@ static void afs_put_super(struct super_block *sb); static void afs_destroy_inode(struct inode *inode); -static struct file_system_type afs_fs_type = { +struct file_system_type afs_fs_type = { .owner = THIS_MODULE, .name = "afs", .get_sb = afs_get_sb, @@ -78,9 +78,7 @@ int __init afs_fs_init(void) _enter(""); -#ifdef AFS_AUTOMOUNT_SUPPORT afs_timer_init(&afs_mntpt_expiry_timer, &afs_mntpt_expiry_timer_ops); -#endif /* create ourselves an inode cache */ atomic_set(&afs_count_active_inodes, 0); @@ -172,7 +170,7 @@ static int afs_super_parse_options(struct afs_mount_params *params, options[PAGE_SIZE - 1] = 0; ret = 0; - while ((key = strsep(&options, ","))) + while ((key = strsep(&options, ",")) != 0) { value = strchr(key, '='); if (value) @@ -296,10 +294,11 @@ static int afs_fill_super(struct super_block *sb, void *data, int silent) * get an AFS superblock * - TODO: don't use get_sb_nodev(), but rather call sget() directly */ -static struct super_block *afs_get_sb(struct file_system_type *fs_type, - int flags, - const char *dev_name, - void *options) +static int afs_get_sb(struct file_system_type *fs_type, + int flags, + const char *dev_name, + void *options, + struct vfsmount *mnt) { struct afs_mount_params params; struct super_block *sb; @@ -313,7 +312,7 @@ static struct super_block *afs_get_sb(struct file_system_type *fs_type, ret = afscm_start(); if (ret < 0) { _leave(" = %d", ret); - return ERR_PTR(ret); + return ret; } /* parse the options */ @@ -343,25 +342,26 @@ static struct super_block *afs_get_sb(struct file_system_type *fs_type, sb->s_flags = flags; - ret = afs_fill_super(sb, ¶ms, flags & MS_VERBOSE ? 1 : 0); + ret = afs_fill_super(sb, ¶ms, flags & MS_SILENT ? 1 : 0); if (ret < 0) { up_write(&sb->s_umount); deactivate_super(sb); goto error; } sb->s_flags |= MS_ACTIVE; + simple_set_mnt(mnt, sb); afs_put_volume(params.volume); afs_put_cell(params.default_cell); - _leave(" = %p", sb); - return sb; + _leave(" = 0 [%p]", 0, sb); + return 0; error: afs_put_volume(params.volume); afs_put_cell(params.default_cell); afscm_stop(); _leave(" = %d", ret); - return ERR_PTR(ret); + return ret; } /* end afs_get_sb() */ /*****************************************************************************/