diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-26 06:16:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:17:13 -0400 |
commit | f7442b3be65bfcabbb5d6e896e65d69e8b261583 (patch) | |
tree | d14dade6966c68592a9fc30b0cfeea0b2526cf8e /fs | |
parent | 4d143beb0429e8c9c5f1dc66c7ff8ee70dde45a4 (diff) |
convert afs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/afs/super.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/fs/afs/super.c b/fs/afs/super.c index eacf76d98ae0..27201cffece4 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -29,9 +29,8 @@ | |||
29 | #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */ | 29 | #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */ |
30 | 30 | ||
31 | static void afs_i_init_once(void *foo); | 31 | static void afs_i_init_once(void *foo); |
32 | static int afs_get_sb(struct file_system_type *fs_type, | 32 | static struct dentry *afs_mount(struct file_system_type *fs_type, |
33 | int flags, const char *dev_name, | 33 | int flags, const char *dev_name, void *data); |
34 | void *data, struct vfsmount *mnt); | ||
35 | static struct inode *afs_alloc_inode(struct super_block *sb); | 34 | static struct inode *afs_alloc_inode(struct super_block *sb); |
36 | static void afs_put_super(struct super_block *sb); | 35 | static void afs_put_super(struct super_block *sb); |
37 | static void afs_destroy_inode(struct inode *inode); | 36 | static void afs_destroy_inode(struct inode *inode); |
@@ -40,7 +39,7 @@ static int afs_statfs(struct dentry *dentry, struct kstatfs *buf); | |||
40 | struct file_system_type afs_fs_type = { | 39 | struct file_system_type afs_fs_type = { |
41 | .owner = THIS_MODULE, | 40 | .owner = THIS_MODULE, |
42 | .name = "afs", | 41 | .name = "afs", |
43 | .get_sb = afs_get_sb, | 42 | .mount = afs_mount, |
44 | .kill_sb = kill_anon_super, | 43 | .kill_sb = kill_anon_super, |
45 | .fs_flags = 0, | 44 | .fs_flags = 0, |
46 | }; | 45 | }; |
@@ -359,11 +358,8 @@ error: | |||
359 | /* | 358 | /* |
360 | * get an AFS superblock | 359 | * get an AFS superblock |
361 | */ | 360 | */ |
362 | static int afs_get_sb(struct file_system_type *fs_type, | 361 | static struct dentry *afs_mount(struct file_system_type *fs_type, |
363 | int flags, | 362 | int flags, const char *dev_name, void *options) |
364 | const char *dev_name, | ||
365 | void *options, | ||
366 | struct vfsmount *mnt) | ||
367 | { | 363 | { |
368 | struct afs_mount_params params; | 364 | struct afs_mount_params params; |
369 | struct super_block *sb; | 365 | struct super_block *sb; |
@@ -427,12 +423,11 @@ static int afs_get_sb(struct file_system_type *fs_type, | |||
427 | ASSERTCMP(sb->s_flags, &, MS_ACTIVE); | 423 | ASSERTCMP(sb->s_flags, &, MS_ACTIVE); |
428 | } | 424 | } |
429 | 425 | ||
430 | simple_set_mnt(mnt, sb); | ||
431 | afs_put_volume(params.volume); | 426 | afs_put_volume(params.volume); |
432 | afs_put_cell(params.cell); | 427 | afs_put_cell(params.cell); |
433 | kfree(new_opts); | 428 | kfree(new_opts); |
434 | _leave(" = 0 [%p]", sb); | 429 | _leave(" = 0 [%p]", sb); |
435 | return 0; | 430 | return dget(sb->s_root); |
436 | 431 | ||
437 | error: | 432 | error: |
438 | afs_put_volume(params.volume); | 433 | afs_put_volume(params.volume); |
@@ -440,7 +435,7 @@ error: | |||
440 | key_put(params.key); | 435 | key_put(params.key); |
441 | kfree(new_opts); | 436 | kfree(new_opts); |
442 | _leave(" = %d", ret); | 437 | _leave(" = %d", ret); |
443 | return ret; | 438 | return ERR_PTR(ret); |
444 | } | 439 | } |
445 | 440 | ||
446 | /* | 441 | /* |