diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-08-02 00:57:06 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-23 05:12:44 -0400 |
commit | 8264613def2e5c4f12bc3167713090fd172e6055 (patch) | |
tree | 00a8655bce02f97acf559580bdd9ba65919af2bf /fs/ext3 | |
parent | 0a0d8a46757e2063433c8cd52b7d654e02b4682b (diff) |
[PATCH] switch quota_on-related stuff to kern_path()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/super.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 3a260af5544d..5b7fee10566f 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -2783,30 +2783,30 @@ static int ext3_quota_on_mount(struct super_block *sb, int type) | |||
2783 | * Standard function to be called on quota_on | 2783 | * Standard function to be called on quota_on |
2784 | */ | 2784 | */ |
2785 | static int ext3_quota_on(struct super_block *sb, int type, int format_id, | 2785 | static int ext3_quota_on(struct super_block *sb, int type, int format_id, |
2786 | char *path, int remount) | 2786 | char *name, int remount) |
2787 | { | 2787 | { |
2788 | int err; | 2788 | int err; |
2789 | struct nameidata nd; | 2789 | struct path path; |
2790 | 2790 | ||
2791 | if (!test_opt(sb, QUOTA)) | 2791 | if (!test_opt(sb, QUOTA)) |
2792 | return -EINVAL; | 2792 | return -EINVAL; |
2793 | /* When remounting, no checks are needed and in fact, path is NULL */ | 2793 | /* When remounting, no checks are needed and in fact, name is NULL */ |
2794 | if (remount) | 2794 | if (remount) |
2795 | return vfs_quota_on(sb, type, format_id, path, remount); | 2795 | return vfs_quota_on(sb, type, format_id, name, remount); |
2796 | 2796 | ||
2797 | err = path_lookup(path, LOOKUP_FOLLOW, &nd); | 2797 | err = kern_path(name, LOOKUP_FOLLOW, &path); |
2798 | if (err) | 2798 | if (err) |
2799 | return err; | 2799 | return err; |
2800 | 2800 | ||
2801 | /* Quotafile not on the same filesystem? */ | 2801 | /* Quotafile not on the same filesystem? */ |
2802 | if (nd.path.mnt->mnt_sb != sb) { | 2802 | if (path.mnt->mnt_sb != sb) { |
2803 | path_put(&nd.path); | 2803 | path_put(&path); |
2804 | return -EXDEV; | 2804 | return -EXDEV; |
2805 | } | 2805 | } |
2806 | /* Journaling quota? */ | 2806 | /* Journaling quota? */ |
2807 | if (EXT3_SB(sb)->s_qf_names[type]) { | 2807 | if (EXT3_SB(sb)->s_qf_names[type]) { |
2808 | /* Quotafile not of fs root? */ | 2808 | /* Quotafile not of fs root? */ |
2809 | if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode) | 2809 | if (path.dentry->d_parent != sb->s_root) |
2810 | printk(KERN_WARNING | 2810 | printk(KERN_WARNING |
2811 | "EXT3-fs: Quota file not on filesystem root. " | 2811 | "EXT3-fs: Quota file not on filesystem root. " |
2812 | "Journaled quota will not work.\n"); | 2812 | "Journaled quota will not work.\n"); |
@@ -2816,7 +2816,7 @@ static int ext3_quota_on(struct super_block *sb, int type, int format_id, | |||
2816 | * When we journal data on quota file, we have to flush journal to see | 2816 | * When we journal data on quota file, we have to flush journal to see |
2817 | * all updates to the file when we bypass pagecache... | 2817 | * all updates to the file when we bypass pagecache... |
2818 | */ | 2818 | */ |
2819 | if (ext3_should_journal_data(nd.path.dentry->d_inode)) { | 2819 | if (ext3_should_journal_data(path.dentry->d_inode)) { |
2820 | /* | 2820 | /* |
2821 | * We don't need to lock updates but journal_flush() could | 2821 | * We don't need to lock updates but journal_flush() could |
2822 | * otherwise be livelocked... | 2822 | * otherwise be livelocked... |
@@ -2826,8 +2826,8 @@ static int ext3_quota_on(struct super_block *sb, int type, int format_id, | |||
2826 | journal_unlock_updates(EXT3_SB(sb)->s_journal); | 2826 | journal_unlock_updates(EXT3_SB(sb)->s_journal); |
2827 | } | 2827 | } |
2828 | 2828 | ||
2829 | err = vfs_quota_on_path(sb, type, format_id, &nd.path); | 2829 | err = vfs_quota_on_path(sb, type, format_id, &path); |
2830 | path_put(&nd.path); | 2830 | path_put(&path); |
2831 | return err; | 2831 | return err; |
2832 | } | 2832 | } |
2833 | 2833 | ||