diff options
Diffstat (limited to 'fs/afs/super.c')
-rw-r--r-- | fs/afs/super.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/fs/afs/super.c b/fs/afs/super.c index 77e1e5a61154..27201cffece4 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/mount.h> | 19 | #include <linux/mount.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/smp_lock.h> | ||
23 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
24 | #include <linux/pagemap.h> | 23 | #include <linux/pagemap.h> |
25 | #include <linux/parser.h> | 24 | #include <linux/parser.h> |
@@ -30,9 +29,8 @@ | |||
30 | #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */ | 29 | #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */ |
31 | 30 | ||
32 | static void afs_i_init_once(void *foo); | 31 | static void afs_i_init_once(void *foo); |
33 | static int afs_get_sb(struct file_system_type *fs_type, | 32 | static struct dentry *afs_mount(struct file_system_type *fs_type, |
34 | int flags, const char *dev_name, | 33 | int flags, const char *dev_name, void *data); |
35 | void *data, struct vfsmount *mnt); | ||
36 | static struct inode *afs_alloc_inode(struct super_block *sb); | 34 | static struct inode *afs_alloc_inode(struct super_block *sb); |
37 | static void afs_put_super(struct super_block *sb); | 35 | static void afs_put_super(struct super_block *sb); |
38 | static void afs_destroy_inode(struct inode *inode); | 36 | static void afs_destroy_inode(struct inode *inode); |
@@ -41,7 +39,7 @@ static int afs_statfs(struct dentry *dentry, struct kstatfs *buf); | |||
41 | struct file_system_type afs_fs_type = { | 39 | struct file_system_type afs_fs_type = { |
42 | .owner = THIS_MODULE, | 40 | .owner = THIS_MODULE, |
43 | .name = "afs", | 41 | .name = "afs", |
44 | .get_sb = afs_get_sb, | 42 | .mount = afs_mount, |
45 | .kill_sb = kill_anon_super, | 43 | .kill_sb = kill_anon_super, |
46 | .fs_flags = 0, | 44 | .fs_flags = 0, |
47 | }; | 45 | }; |
@@ -360,11 +358,8 @@ error: | |||
360 | /* | 358 | /* |
361 | * get an AFS superblock | 359 | * get an AFS superblock |
362 | */ | 360 | */ |
363 | static int afs_get_sb(struct file_system_type *fs_type, | 361 | static struct dentry *afs_mount(struct file_system_type *fs_type, |
364 | int flags, | 362 | int flags, const char *dev_name, void *options) |
365 | const char *dev_name, | ||
366 | void *options, | ||
367 | struct vfsmount *mnt) | ||
368 | { | 363 | { |
369 | struct afs_mount_params params; | 364 | struct afs_mount_params params; |
370 | struct super_block *sb; | 365 | struct super_block *sb; |
@@ -428,12 +423,11 @@ static int afs_get_sb(struct file_system_type *fs_type, | |||
428 | ASSERTCMP(sb->s_flags, &, MS_ACTIVE); | 423 | ASSERTCMP(sb->s_flags, &, MS_ACTIVE); |
429 | } | 424 | } |
430 | 425 | ||
431 | simple_set_mnt(mnt, sb); | ||
432 | afs_put_volume(params.volume); | 426 | afs_put_volume(params.volume); |
433 | afs_put_cell(params.cell); | 427 | afs_put_cell(params.cell); |
434 | kfree(new_opts); | 428 | kfree(new_opts); |
435 | _leave(" = 0 [%p]", sb); | 429 | _leave(" = 0 [%p]", sb); |
436 | return 0; | 430 | return dget(sb->s_root); |
437 | 431 | ||
438 | error: | 432 | error: |
439 | afs_put_volume(params.volume); | 433 | afs_put_volume(params.volume); |
@@ -441,7 +435,7 @@ error: | |||
441 | key_put(params.key); | 435 | key_put(params.key); |
442 | kfree(new_opts); | 436 | kfree(new_opts); |
443 | _leave(" = %d", ret); | 437 | _leave(" = %d", ret); |
444 | return ret; | 438 | return ERR_PTR(ret); |
445 | } | 439 | } |
446 | 440 | ||
447 | /* | 441 | /* |
@@ -453,12 +447,8 @@ static void afs_put_super(struct super_block *sb) | |||
453 | 447 | ||
454 | _enter(""); | 448 | _enter(""); |
455 | 449 | ||
456 | lock_kernel(); | ||
457 | |||
458 | afs_put_volume(as->volume); | 450 | afs_put_volume(as->volume); |
459 | 451 | ||
460 | unlock_kernel(); | ||
461 | |||
462 | _leave(""); | 452 | _leave(""); |
463 | } | 453 | } |
464 | 454 | ||