aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:22:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:22:40 -0400
commit5ed487bc2c44ca4e9668ef9cb54c830e2a9fac47 (patch)
treeaf19ed28db83e8f52690872ac99336da1cf2fd3b /fs/ext4/super.c
parent5b34653963de7a6d0d8c783527457d68fddc60fb (diff)
parentfd217f4d70172c526478f2bc76859e909fdfa674 (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/ext4/super.c')
-rw-r--r--fs/ext4/super.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 9b2b2bc4ec17..ae35f176b697 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3328,30 +3328,30 @@ static int ext4_quota_on_mount(struct super_block *sb, int type)
3328 * Standard function to be called on quota_on 3328 * Standard function to be called on quota_on
3329 */ 3329 */
3330static int ext4_quota_on(struct super_block *sb, int type, int format_id, 3330static int ext4_quota_on(struct super_block *sb, int type, int format_id,
3331 char *path, int remount) 3331 char *name, int remount)
3332{ 3332{
3333 int err; 3333 int err;
3334 struct nameidata nd; 3334 struct path path;
3335 3335
3336 if (!test_opt(sb, QUOTA)) 3336 if (!test_opt(sb, QUOTA))
3337 return -EINVAL; 3337 return -EINVAL;
3338 /* When remounting, no checks are needed and in fact, path is NULL */ 3338 /* When remounting, no checks are needed and in fact, name is NULL */
3339 if (remount) 3339 if (remount)
3340 return vfs_quota_on(sb, type, format_id, path, remount); 3340 return vfs_quota_on(sb, type, format_id, name, remount);
3341 3341
3342 err = path_lookup(path, LOOKUP_FOLLOW, &nd); 3342 err = kern_path(name, LOOKUP_FOLLOW, &path);
3343 if (err) 3343 if (err)
3344 return err; 3344 return err;
3345 3345
3346 /* Quotafile not on the same filesystem? */ 3346 /* Quotafile not on the same filesystem? */
3347 if (nd.path.mnt->mnt_sb != sb) { 3347 if (path.mnt->mnt_sb != sb) {
3348 path_put(&nd.path); 3348 path_put(&path);
3349 return -EXDEV; 3349 return -EXDEV;
3350 } 3350 }
3351 /* Journaling quota? */ 3351 /* Journaling quota? */
3352 if (EXT4_SB(sb)->s_qf_names[type]) { 3352 if (EXT4_SB(sb)->s_qf_names[type]) {
3353 /* Quotafile not in fs root? */ 3353 /* Quotafile not in fs root? */
3354 if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode) 3354 if (path.dentry->d_parent != sb->s_root)
3355 printk(KERN_WARNING 3355 printk(KERN_WARNING
3356 "EXT4-fs: Quota file not on filesystem root. " 3356 "EXT4-fs: Quota file not on filesystem root. "
3357 "Journaled quota will not work.\n"); 3357 "Journaled quota will not work.\n");
@@ -3361,7 +3361,7 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
3361 * When we journal data on quota file, we have to flush journal to see 3361 * When we journal data on quota file, we have to flush journal to see
3362 * all updates to the file when we bypass pagecache... 3362 * all updates to the file when we bypass pagecache...
3363 */ 3363 */
3364 if (ext4_should_journal_data(nd.path.dentry->d_inode)) { 3364 if (ext4_should_journal_data(path.dentry->d_inode)) {
3365 /* 3365 /*
3366 * We don't need to lock updates but journal_flush() could 3366 * We don't need to lock updates but journal_flush() could
3367 * otherwise be livelocked... 3367 * otherwise be livelocked...
@@ -3370,13 +3370,13 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
3370 err = jbd2_journal_flush(EXT4_SB(sb)->s_journal); 3370 err = jbd2_journal_flush(EXT4_SB(sb)->s_journal);
3371 jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal); 3371 jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal);
3372 if (err) { 3372 if (err) {
3373 path_put(&nd.path); 3373 path_put(&path);
3374 return err; 3374 return err;
3375 } 3375 }
3376 } 3376 }
3377 3377
3378 err = vfs_quota_on_path(sb, type, format_id, &nd.path); 3378 err = vfs_quota_on_path(sb, type, format_id, &path);
3379 path_put(&nd.path); 3379 path_put(&path);
3380 return err; 3380 return err;
3381} 3381}
3382 3382