diff options
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r-- | fs/reiserfs/super.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index e15ff612002d..0aab04f46827 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/mount.h> | 28 | #include <linux/mount.h> |
29 | #include <linux/namei.h> | 29 | #include <linux/namei.h> |
30 | #include <linux/crc32.h> | 30 | #include <linux/crc32.h> |
31 | #include <linux/smp_lock.h> | ||
32 | 31 | ||
33 | struct file_system_type reiserfs_fs_type; | 32 | struct file_system_type reiserfs_fs_type; |
34 | 33 | ||
@@ -530,11 +529,18 @@ static struct inode *reiserfs_alloc_inode(struct super_block *sb) | |||
530 | return &ei->vfs_inode; | 529 | return &ei->vfs_inode; |
531 | } | 530 | } |
532 | 531 | ||
533 | static void reiserfs_destroy_inode(struct inode *inode) | 532 | static void reiserfs_i_callback(struct rcu_head *head) |
534 | { | 533 | { |
534 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
535 | INIT_LIST_HEAD(&inode->i_dentry); | ||
535 | kmem_cache_free(reiserfs_inode_cachep, REISERFS_I(inode)); | 536 | kmem_cache_free(reiserfs_inode_cachep, REISERFS_I(inode)); |
536 | } | 537 | } |
537 | 538 | ||
539 | static void reiserfs_destroy_inode(struct inode *inode) | ||
540 | { | ||
541 | call_rcu(&inode->i_rcu, reiserfs_i_callback); | ||
542 | } | ||
543 | |||
538 | static void init_once(void *foo) | 544 | static void init_once(void *foo) |
539 | { | 545 | { |
540 | struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo; | 546 | struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo; |
@@ -626,7 +632,7 @@ static int reiserfs_acquire_dquot(struct dquot *); | |||
626 | static int reiserfs_release_dquot(struct dquot *); | 632 | static int reiserfs_release_dquot(struct dquot *); |
627 | static int reiserfs_mark_dquot_dirty(struct dquot *); | 633 | static int reiserfs_mark_dquot_dirty(struct dquot *); |
628 | static int reiserfs_write_info(struct super_block *, int); | 634 | static int reiserfs_write_info(struct super_block *, int); |
629 | static int reiserfs_quota_on(struct super_block *, int, int, char *); | 635 | static int reiserfs_quota_on(struct super_block *, int, int, struct path *); |
630 | 636 | ||
631 | static const struct dquot_operations reiserfs_quota_operations = { | 637 | static const struct dquot_operations reiserfs_quota_operations = { |
632 | .write_dquot = reiserfs_write_dquot, | 638 | .write_dquot = reiserfs_write_dquot, |
@@ -2042,25 +2048,21 @@ static int reiserfs_quota_on_mount(struct super_block *sb, int type) | |||
2042 | * Standard function to be called on quota_on | 2048 | * Standard function to be called on quota_on |
2043 | */ | 2049 | */ |
2044 | static int reiserfs_quota_on(struct super_block *sb, int type, int format_id, | 2050 | static int reiserfs_quota_on(struct super_block *sb, int type, int format_id, |
2045 | char *name) | 2051 | struct path *path) |
2046 | { | 2052 | { |
2047 | int err; | 2053 | int err; |
2048 | struct path path; | ||
2049 | struct inode *inode; | 2054 | struct inode *inode; |
2050 | struct reiserfs_transaction_handle th; | 2055 | struct reiserfs_transaction_handle th; |
2051 | 2056 | ||
2052 | if (!(REISERFS_SB(sb)->s_mount_opt & (1 << REISERFS_QUOTA))) | 2057 | if (!(REISERFS_SB(sb)->s_mount_opt & (1 << REISERFS_QUOTA))) |
2053 | return -EINVAL; | 2058 | return -EINVAL; |
2054 | 2059 | ||
2055 | err = kern_path(name, LOOKUP_FOLLOW, &path); | ||
2056 | if (err) | ||
2057 | return err; | ||
2058 | /* Quotafile not on the same filesystem? */ | 2060 | /* Quotafile not on the same filesystem? */ |
2059 | if (path.mnt->mnt_sb != sb) { | 2061 | if (path->mnt->mnt_sb != sb) { |
2060 | err = -EXDEV; | 2062 | err = -EXDEV; |
2061 | goto out; | 2063 | goto out; |
2062 | } | 2064 | } |
2063 | inode = path.dentry->d_inode; | 2065 | inode = path->dentry->d_inode; |
2064 | /* We must not pack tails for quota files on reiserfs for quota IO to work */ | 2066 | /* We must not pack tails for quota files on reiserfs for quota IO to work */ |
2065 | if (!(REISERFS_I(inode)->i_flags & i_nopack_mask)) { | 2067 | if (!(REISERFS_I(inode)->i_flags & i_nopack_mask)) { |
2066 | err = reiserfs_unpack(inode, NULL); | 2068 | err = reiserfs_unpack(inode, NULL); |
@@ -2076,7 +2078,7 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id, | |||
2076 | /* Journaling quota? */ | 2078 | /* Journaling quota? */ |
2077 | if (REISERFS_SB(sb)->s_qf_names[type]) { | 2079 | if (REISERFS_SB(sb)->s_qf_names[type]) { |
2078 | /* Quotafile not of fs root? */ | 2080 | /* Quotafile not of fs root? */ |
2079 | if (path.dentry->d_parent != sb->s_root) | 2081 | if (path->dentry->d_parent != sb->s_root) |
2080 | reiserfs_warning(sb, "super-6521", | 2082 | reiserfs_warning(sb, "super-6521", |
2081 | "Quota file not on filesystem root. " | 2083 | "Quota file not on filesystem root. " |
2082 | "Journalled quota will not work."); | 2084 | "Journalled quota will not work."); |
@@ -2095,9 +2097,8 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id, | |||
2095 | if (err) | 2097 | if (err) |
2096 | goto out; | 2098 | goto out; |
2097 | } | 2099 | } |
2098 | err = dquot_quota_on_path(sb, type, format_id, &path); | 2100 | err = dquot_quota_on(sb, type, format_id, path); |
2099 | out: | 2101 | out: |
2100 | path_put(&path); | ||
2101 | return err; | 2102 | return err; |
2102 | } | 2103 | } |
2103 | 2104 | ||
@@ -2213,12 +2214,11 @@ out: | |||
2213 | 2214 | ||
2214 | #endif | 2215 | #endif |
2215 | 2216 | ||
2216 | static int get_super_block(struct file_system_type *fs_type, | 2217 | static struct dentry *get_super_block(struct file_system_type *fs_type, |
2217 | int flags, const char *dev_name, | 2218 | int flags, const char *dev_name, |
2218 | void *data, struct vfsmount *mnt) | 2219 | void *data) |
2219 | { | 2220 | { |
2220 | return get_sb_bdev(fs_type, flags, dev_name, data, reiserfs_fill_super, | 2221 | return mount_bdev(fs_type, flags, dev_name, data, reiserfs_fill_super); |
2221 | mnt); | ||
2222 | } | 2222 | } |
2223 | 2223 | ||
2224 | static int __init init_reiserfs_fs(void) | 2224 | static int __init init_reiserfs_fs(void) |
@@ -2253,7 +2253,7 @@ static void __exit exit_reiserfs_fs(void) | |||
2253 | struct file_system_type reiserfs_fs_type = { | 2253 | struct file_system_type reiserfs_fs_type = { |
2254 | .owner = THIS_MODULE, | 2254 | .owner = THIS_MODULE, |
2255 | .name = "reiserfs", | 2255 | .name = "reiserfs", |
2256 | .get_sb = get_super_block, | 2256 | .mount = get_super_block, |
2257 | .kill_sb = reiserfs_kill_sb, | 2257 | .kill_sb = reiserfs_kill_sb, |
2258 | .fs_flags = FS_REQUIRES_DEV, | 2258 | .fs_flags = FS_REQUIRES_DEV, |
2259 | }; | 2259 | }; |