diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:22:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:22:40 -0400 |
commit | 5ed487bc2c44ca4e9668ef9cb54c830e2a9fac47 (patch) | |
tree | af19ed28db83e8f52690872ac99336da1cf2fd3b /fs/ext3/super.c | |
parent | 5b34653963de7a6d0d8c783527457d68fddc60fb (diff) | |
parent | fd217f4d70172c526478f2bc76859e909fdfa674 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (46 commits)
[PATCH] fs: add a sanity check in d_free
[PATCH] i_version: remount support
[patch] vfs: make security_inode_setattr() calling consistent
[patch 1/3] FS_MBCACHE: don't needlessly make it built-in
[PATCH] move executable checking into ->permission()
[PATCH] fs/dcache.c: update comment of d_validate()
[RFC PATCH] touch_mnt_namespace when the mount flags change
[PATCH] reiserfs: add missing llseek method
[PATCH] fix ->llseek for more directories
[PATCH vfs-2.6 6/6] vfs: add LOOKUP_RENAME_TARGET intent
[PATCH vfs-2.6 5/6] vfs: remove LOOKUP_PARENT from non LOOKUP_PARENT lookup
[PATCH vfs-2.6 4/6] vfs: remove unnecessary fsnotify_d_instantiate()
[PATCH vfs-2.6 3/6] vfs: add __d_instantiate() helper
[PATCH vfs-2.6 2/6] vfs: add d_ancestor()
[PATCH vfs-2.6 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT()
[PATCH] get rid of on-stack dentry in udf
[PATCH 2/2] anondev: switch to IDA
[PATCH 1/2] anondev: init IDR statically
[JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup()
[PATCH] Optimise NFS readdir hack slightly.
...
Diffstat (limited to 'fs/ext3/super.c')
-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 cac29ee3b14a..34b6fca765d7 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -2794,30 +2794,30 @@ static int ext3_quota_on_mount(struct super_block *sb, int type) | |||
2794 | * Standard function to be called on quota_on | 2794 | * Standard function to be called on quota_on |
2795 | */ | 2795 | */ |
2796 | static int ext3_quota_on(struct super_block *sb, int type, int format_id, | 2796 | static int ext3_quota_on(struct super_block *sb, int type, int format_id, |
2797 | char *path, int remount) | 2797 | char *name, int remount) |
2798 | { | 2798 | { |
2799 | int err; | 2799 | int err; |
2800 | struct nameidata nd; | 2800 | struct path path; |
2801 | 2801 | ||
2802 | if (!test_opt(sb, QUOTA)) | 2802 | if (!test_opt(sb, QUOTA)) |
2803 | return -EINVAL; | 2803 | return -EINVAL; |
2804 | /* When remounting, no checks are needed and in fact, path is NULL */ | 2804 | /* When remounting, no checks are needed and in fact, name is NULL */ |
2805 | if (remount) | 2805 | if (remount) |
2806 | return vfs_quota_on(sb, type, format_id, path, remount); | 2806 | return vfs_quota_on(sb, type, format_id, name, remount); |
2807 | 2807 | ||
2808 | err = path_lookup(path, LOOKUP_FOLLOW, &nd); | 2808 | err = kern_path(name, LOOKUP_FOLLOW, &path); |
2809 | if (err) | 2809 | if (err) |
2810 | return err; | 2810 | return err; |
2811 | 2811 | ||
2812 | /* Quotafile not on the same filesystem? */ | 2812 | /* Quotafile not on the same filesystem? */ |
2813 | if (nd.path.mnt->mnt_sb != sb) { | 2813 | if (path.mnt->mnt_sb != sb) { |
2814 | path_put(&nd.path); | 2814 | path_put(&path); |
2815 | return -EXDEV; | 2815 | return -EXDEV; |
2816 | } | 2816 | } |
2817 | /* Journaling quota? */ | 2817 | /* Journaling quota? */ |
2818 | if (EXT3_SB(sb)->s_qf_names[type]) { | 2818 | if (EXT3_SB(sb)->s_qf_names[type]) { |
2819 | /* Quotafile not of fs root? */ | 2819 | /* Quotafile not of fs root? */ |
2820 | if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode) | 2820 | if (path.dentry->d_parent != sb->s_root) |
2821 | printk(KERN_WARNING | 2821 | printk(KERN_WARNING |
2822 | "EXT3-fs: Quota file not on filesystem root. " | 2822 | "EXT3-fs: Quota file not on filesystem root. " |
2823 | "Journaled quota will not work.\n"); | 2823 | "Journaled quota will not work.\n"); |
@@ -2827,7 +2827,7 @@ static int ext3_quota_on(struct super_block *sb, int type, int format_id, | |||
2827 | * When we journal data on quota file, we have to flush journal to see | 2827 | * When we journal data on quota file, we have to flush journal to see |
2828 | * all updates to the file when we bypass pagecache... | 2828 | * all updates to the file when we bypass pagecache... |
2829 | */ | 2829 | */ |
2830 | if (ext3_should_journal_data(nd.path.dentry->d_inode)) { | 2830 | if (ext3_should_journal_data(path.dentry->d_inode)) { |
2831 | /* | 2831 | /* |
2832 | * We don't need to lock updates but journal_flush() could | 2832 | * We don't need to lock updates but journal_flush() could |
2833 | * otherwise be livelocked... | 2833 | * otherwise be livelocked... |
@@ -2841,8 +2841,8 @@ static int ext3_quota_on(struct super_block *sb, int type, int format_id, | |||
2841 | } | 2841 | } |
2842 | } | 2842 | } |
2843 | 2843 | ||
2844 | err = vfs_quota_on_path(sb, type, format_id, &nd.path); | 2844 | err = vfs_quota_on_path(sb, type, format_id, &path); |
2845 | path_put(&nd.path); | 2845 | path_put(&path); |
2846 | return err; | 2846 | return err; |
2847 | } | 2847 | } |
2848 | 2848 | ||