···18051805}1806180618071807/* Actual function called from quotactl() */18081808-int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path,18081808+int vfs_quota_on(struct super_block *sb, int type, int format_id, char *name,18091809 int remount)18101810{18111811- struct nameidata nd;18111811+ struct path path;18121812 int error;1813181318141814 if (remount)18151815 return vfs_quota_on_remount(sb, type);1816181618171817- error = path_lookup(path, LOOKUP_FOLLOW, &nd);18171817+ error = kern_path(name, LOOKUP_FOLLOW, &path);18181818 if (!error) {18191819- error = vfs_quota_on_path(sb, type, format_id, &nd.path);18201820- path_put(&nd.path);18191819+ error = vfs_quota_on_path(sb, type, format_id, &path);18201820+ path_put(&path);18211821 }18221822 return error;18231823}
+11-11
fs/ext3/super.c
···27832783 * Standard function to be called on quota_on27842784 */27852785static int ext3_quota_on(struct super_block *sb, int type, int format_id,27862786- char *path, int remount)27862786+ char *name, int remount)27872787{27882788 int err;27892789- struct nameidata nd;27892789+ struct path path;2790279027912791 if (!test_opt(sb, QUOTA))27922792 return -EINVAL;27932793- /* When remounting, no checks are needed and in fact, path is NULL */27932793+ /* When remounting, no checks are needed and in fact, name is NULL */27942794 if (remount)27952795- return vfs_quota_on(sb, type, format_id, path, remount);27952795+ return vfs_quota_on(sb, type, format_id, name, remount);2796279627972797- err = path_lookup(path, LOOKUP_FOLLOW, &nd);27972797+ err = kern_path(name, LOOKUP_FOLLOW, &path);27982798 if (err)27992799 return err;2800280028012801 /* Quotafile not on the same filesystem? */28022802- if (nd.path.mnt->mnt_sb != sb) {28032803- path_put(&nd.path);28022802+ if (path.mnt->mnt_sb != sb) {28032803+ path_put(&path);28042804 return -EXDEV;28052805 }28062806 /* Journaling quota? */28072807 if (EXT3_SB(sb)->s_qf_names[type]) {28082808 /* Quotafile not of fs root? */28092809- if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode)28092809+ if (path.dentry->d_parent != sb->s_root)28102810 printk(KERN_WARNING28112811 "EXT3-fs: Quota file not on filesystem root. "28122812 "Journaled quota will not work.\n");···28162816 * When we journal data on quota file, we have to flush journal to see28172817 * all updates to the file when we bypass pagecache...28182818 */28192819- if (ext3_should_journal_data(nd.path.dentry->d_inode)) {28192819+ if (ext3_should_journal_data(path.dentry->d_inode)) {28202820 /*28212821 * We don't need to lock updates but journal_flush() could28222822 * otherwise be livelocked...···28262826 journal_unlock_updates(EXT3_SB(sb)->s_journal);28272827 }2828282828292829- err = vfs_quota_on_path(sb, type, format_id, &nd.path);28302830- path_put(&nd.path);28292829+ err = vfs_quota_on_path(sb, type, format_id, &path);28302830+ path_put(&path);28312831 return err;28322832}28332833
+12-12
fs/ext4/super.c
···33283328 * Standard function to be called on quota_on33293329 */33303330static int ext4_quota_on(struct super_block *sb, int type, int format_id,33313331- char *path, int remount)33313331+ char *name, int remount)33323332{33333333 int err;33343334- struct nameidata nd;33343334+ struct path path;3335333533363336 if (!test_opt(sb, QUOTA))33373337 return -EINVAL;33383338- /* When remounting, no checks are needed and in fact, path is NULL */33383338+ /* When remounting, no checks are needed and in fact, name is NULL */33393339 if (remount)33403340- return vfs_quota_on(sb, type, format_id, path, remount);33403340+ return vfs_quota_on(sb, type, format_id, name, remount);3341334133423342- err = path_lookup(path, LOOKUP_FOLLOW, &nd);33423342+ err = kern_path(name, LOOKUP_FOLLOW, &path);33433343 if (err)33443344 return err;3345334533463346 /* Quotafile not on the same filesystem? */33473347- if (nd.path.mnt->mnt_sb != sb) {33483348- path_put(&nd.path);33473347+ if (path.mnt->mnt_sb != sb) {33483348+ path_put(&path);33493349 return -EXDEV;33503350 }33513351 /* Journaling quota? */33523352 if (EXT4_SB(sb)->s_qf_names[type]) {33533353 /* Quotafile not in fs root? */33543354- if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode)33543354+ if (path.dentry->d_parent != sb->s_root)33553355 printk(KERN_WARNING33563356 "EXT4-fs: Quota file not on filesystem root. "33573357 "Journaled quota will not work.\n");···33613361 * When we journal data on quota file, we have to flush journal to see33623362 * all updates to the file when we bypass pagecache...33633363 */33643364- if (ext4_should_journal_data(nd.path.dentry->d_inode)) {33643364+ if (ext4_should_journal_data(path.dentry->d_inode)) {33653365 /*33663366 * We don't need to lock updates but journal_flush() could33673367 * otherwise be livelocked...···33703370 err = jbd2_journal_flush(EXT4_SB(sb)->s_journal);33713371 jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal);33723372 if (err) {33733373- path_put(&nd.path);33733373+ path_put(&path);33743374 return err;33753375 }33763376 }3377337733783378- err = vfs_quota_on_path(sb, type, format_id, &nd.path);33793379- path_put(&nd.path);33783378+ err = vfs_quota_on_path(sb, type, format_id, &path);33793379+ path_put(&path);33803380 return err;33813381}33823382
+9-9
fs/reiserfs/super.c
···20582058 * Standard function to be called on quota_on20592059 */20602060static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,20612061- char *path, int remount)20612061+ char *name, int remount)20622062{20632063 int err;20642064- struct nameidata nd;20642064+ struct path path;20652065 struct inode *inode;20662066 struct reiserfs_transaction_handle th;20672067···20692069 return -EINVAL;20702070 /* No more checks needed? Path and format_id are bogus anyway... */20712071 if (remount)20722072- return vfs_quota_on(sb, type, format_id, path, 1);20732073- err = path_lookup(path, LOOKUP_FOLLOW, &nd);20722072+ return vfs_quota_on(sb, type, format_id, name, 1);20732073+ err = kern_path(name, LOOKUP_FOLLOW, &path);20742074 if (err)20752075 return err;20762076 /* Quotafile not on the same filesystem? */20772077- if (nd.path.mnt->mnt_sb != sb) {20772077+ if (path.mnt->mnt_sb != sb) {20782078 err = -EXDEV;20792079 goto out;20802080 }20812081- inode = nd.path.dentry->d_inode;20812081+ inode = path.dentry->d_inode;20822082 /* We must not pack tails for quota files on reiserfs for quota IO to work */20832083 if (!(REISERFS_I(inode)->i_flags & i_nopack_mask)) {20842084 err = reiserfs_unpack(inode, NULL);···20942094 /* Journaling quota? */20952095 if (REISERFS_SB(sb)->s_qf_names[type]) {20962096 /* Quotafile not of fs root? */20972097- if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode)20972097+ if (path.dentry->d_parent != sb->s_root)20982098 reiserfs_warning(sb,20992099 "reiserfs: Quota file not on filesystem root. "21002100 "Journalled quota will not work.");···21132113 if (err)21142114 goto out;21152115 }21162116- err = vfs_quota_on_path(sb, type, format_id, &nd.path);21162116+ err = vfs_quota_on_path(sb, type, format_id, &path);21172117out:21182118- path_put(&nd.path);21182118+ path_put(&path);21192119 return err;21202120}21212121