Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

stop passing nameidata to ->lookup()

Just the flags; only NFS cares even about that, but there are
legitimate uses for such argument. And getting rid of that
completely would require splitting ->lookup() into a couple
of methods (at least), so let's leave that alone for now...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 00cd8dd3 201f956e

+115 -114
+1 -2
Documentation/filesystems/Locking
··· 38 38 --------------------------- inode_operations --------------------------- 39 39 prototypes: 40 40 int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *); 41 - struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid 42 - ata *); 41 + struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); 43 42 int (*link) (struct dentry *,struct inode *,struct dentry *); 44 43 int (*unlink) (struct inode *,struct dentry *); 45 44 int (*symlink) (struct inode *,struct dentry *,const char *);
+2 -2
Documentation/filesystems/porting
··· 434 434 435 435 -- 436 436 [mandatory] 437 - The witch is dead! Well, 1/3 of it, anyway. ->d_revalidate() does *not* 438 - take struct nameidata anymore; just the flags. 437 + The witch is dead! Well, 2/3 of it, anyway. ->d_revalidate() and 438 + ->lookup() do *not* take struct nameidata anymore; just the flags.
+1 -1
Documentation/filesystems/vfs.txt
··· 342 342 343 343 struct inode_operations { 344 344 int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *); 345 - struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); 345 + struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); 346 346 int (*link) (struct dentry *,struct inode *,struct dentry *); 347 347 int (*unlink) (struct inode *,struct dentry *); 348 348 int (*symlink) (struct inode *,struct dentry *,const char *);
+1 -1
fs/9p/v9fs.h
··· 144 144 extern void v9fs_session_cancel(struct v9fs_session_info *v9ses); 145 145 extern void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses); 146 146 extern struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, 147 - struct nameidata *nameidata); 147 + unsigned int flags); 148 148 extern int v9fs_vfs_unlink(struct inode *i, struct dentry *d); 149 149 extern int v9fs_vfs_rmdir(struct inode *i, struct dentry *d); 150 150 extern int v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+4 -4
fs/9p/vfs_inode.c
··· 785 785 */ 786 786 787 787 struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, 788 - struct nameidata *nameidata) 788 + unsigned int flags) 789 789 { 790 790 struct dentry *res; 791 791 struct super_block *sb; ··· 795 795 char *name; 796 796 int result = 0; 797 797 798 - p9_debug(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p nameidata: %p\n", 799 - dir, dentry->d_name.name, dentry, nameidata); 798 + p9_debug(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p flags: %x\n", 799 + dir, dentry->d_name.name, dentry, flags); 800 800 801 801 if (dentry->d_name.len > NAME_MAX) 802 802 return ERR_PTR(-ENAMETOOLONG); ··· 869 869 struct dentry *res = NULL; 870 870 871 871 if (d_unhashed(dentry)) { 872 - res = v9fs_vfs_lookup(dir, dentry, NULL); 872 + res = v9fs_vfs_lookup(dir, dentry, 0); 873 873 if (IS_ERR(res)) 874 874 return PTR_ERR(res); 875 875
+1 -1
fs/9p/vfs_inode_dotl.c
··· 259 259 struct dentry *res = NULL; 260 260 261 261 if (d_unhashed(dentry)) { 262 - res = v9fs_vfs_lookup(dir, dentry, NULL); 262 + res = v9fs_vfs_lookup(dir, dentry, 0); 263 263 if (IS_ERR(res)) 264 264 return PTR_ERR(res); 265 265
+1 -1
fs/adfs/dir.c
··· 266 266 }; 267 267 268 268 static struct dentry * 269 - adfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 269 + adfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 270 270 { 271 271 struct inode *inode = NULL; 272 272 struct object_info obj;
+1 -1
fs/affs/affs.h
··· 153 153 /* namei.c */ 154 154 155 155 extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len); 156 - extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *); 156 + extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int); 157 157 extern int affs_unlink(struct inode *dir, struct dentry *dentry); 158 158 extern int affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *); 159 159 extern int affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
+1 -1
fs/affs/namei.c
··· 211 211 } 212 212 213 213 struct dentry * 214 - affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 214 + affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 215 215 { 216 216 struct super_block *sb = dir->i_sb; 217 217 struct buffer_head *bh;
+2 -2
fs/afs/dir.c
··· 20 20 #include "internal.h" 21 21 22 22 static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry, 23 - struct nameidata *nd); 23 + unsigned int flags); 24 24 static int afs_dir_open(struct inode *inode, struct file *file); 25 25 static int afs_readdir(struct file *file, void *dirent, filldir_t filldir); 26 26 static int afs_d_revalidate(struct dentry *dentry, unsigned int flags); ··· 516 516 * look up an entry in a directory 517 517 */ 518 518 static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry, 519 - struct nameidata *nd) 519 + unsigned int flags) 520 520 { 521 521 struct afs_vnode *vnode; 522 522 struct afs_fid fid;
+2 -2
fs/afs/mntpt.c
··· 22 22 23 23 static struct dentry *afs_mntpt_lookup(struct inode *dir, 24 24 struct dentry *dentry, 25 - struct nameidata *nd); 25 + unsigned int flags); 26 26 static int afs_mntpt_open(struct inode *inode, struct file *file); 27 27 static void afs_mntpt_expiry_timed_out(struct work_struct *work); 28 28 ··· 104 104 */ 105 105 static struct dentry *afs_mntpt_lookup(struct inode *dir, 106 106 struct dentry *dentry, 107 - struct nameidata *nd) 107 + unsigned int flags) 108 108 { 109 109 _enter("%p,%p{%p{%s},%s}", 110 110 dir,
+2 -2
fs/autofs4/root.c
··· 32 32 static long autofs4_root_compat_ioctl(struct file *,unsigned int,unsigned long); 33 33 #endif 34 34 static int autofs4_dir_open(struct inode *inode, struct file *file); 35 - static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *); 35 + static struct dentry *autofs4_lookup(struct inode *,struct dentry *, unsigned int); 36 36 static struct vfsmount *autofs4_d_automount(struct path *); 37 37 static int autofs4_d_manage(struct dentry *, bool); 38 38 static void autofs4_dentry_release(struct dentry *); ··· 458 458 } 459 459 460 460 /* Lookups in the root directory */ 461 - static struct dentry *autofs4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 461 + static struct dentry *autofs4_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 462 462 { 463 463 struct autofs_sb_info *sbi; 464 464 struct autofs_info *ino;
+1 -1
fs/bad_inode.c
··· 179 179 } 180 180 181 181 static struct dentry *bad_inode_lookup(struct inode *dir, 182 - struct dentry *dentry, struct nameidata *nd) 182 + struct dentry *dentry, unsigned int flags) 183 183 { 184 184 return ERR_PTR(-EIO); 185 185 }
+2 -2
fs/befs/linuxvfs.c
··· 34 34 static int befs_get_block(struct inode *, sector_t, struct buffer_head *, int); 35 35 static int befs_readpage(struct file *file, struct page *page); 36 36 static sector_t befs_bmap(struct address_space *mapping, sector_t block); 37 - static struct dentry *befs_lookup(struct inode *, struct dentry *, struct nameidata *); 37 + static struct dentry *befs_lookup(struct inode *, struct dentry *, unsigned int); 38 38 static struct inode *befs_iget(struct super_block *, unsigned long); 39 39 static struct inode *befs_alloc_inode(struct super_block *sb); 40 40 static void befs_destroy_inode(struct inode *inode); ··· 159 159 } 160 160 161 161 static struct dentry * 162 - befs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 162 + befs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 163 163 { 164 164 struct inode *inode = NULL; 165 165 struct super_block *sb = dir->i_sb;
+1 -1
fs/bfs/dir.c
··· 133 133 } 134 134 135 135 static struct dentry *bfs_lookup(struct inode *dir, struct dentry *dentry, 136 - struct nameidata *nd) 136 + unsigned int flags) 137 137 { 138 138 struct inode *inode = NULL; 139 139 struct buffer_head *bh;
+1 -1
fs/btrfs/inode.c
··· 4247 4247 } 4248 4248 4249 4249 static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry, 4250 - struct nameidata *nd) 4250 + unsigned int flags) 4251 4251 { 4252 4252 struct dentry *ret; 4253 4253
+3 -3
fs/ceph/dir.c
··· 576 576 * the MDS so that it gets our 'caps wanted' value in a single op. 577 577 */ 578 578 static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry, 579 - struct nameidata *nd) 579 + unsigned int flags) 580 580 { 581 581 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); 582 582 struct ceph_mds_client *mdsc = fsc->mdsc; ··· 653 653 } 654 654 655 655 if (d_unhashed(dentry)) { 656 - res = ceph_lookup(dir, dentry, NULL); 656 + res = ceph_lookup(dir, dentry, 0); 657 657 if (IS_ERR(res)) 658 658 return PTR_ERR(res); 659 659 ··· 678 678 */ 679 679 int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry) 680 680 { 681 - struct dentry *result = ceph_lookup(dir, dentry, NULL); 681 + struct dentry *result = ceph_lookup(dir, dentry, 0); 682 682 683 683 if (result && !IS_ERR(result)) { 684 684 /*
+1 -1
fs/cifs/cifsfs.h
··· 50 50 struct file *, unsigned, umode_t, 51 51 int *); 52 52 extern struct dentry *cifs_lookup(struct inode *, struct dentry *, 53 - struct nameidata *); 53 + unsigned int); 54 54 extern int cifs_unlink(struct inode *dir, struct dentry *dentry); 55 55 extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *); 56 56 extern int cifs_mknod(struct inode *, struct dentry *, umode_t, dev_t);
+2 -2
fs/cifs/dir.c
··· 401 401 * in network traffic in the other paths. 402 402 */ 403 403 if (!(oflags & O_CREAT)) { 404 - struct dentry *res = cifs_lookup(inode, direntry, NULL); 404 + struct dentry *res = cifs_lookup(inode, direntry, 0); 405 405 if (IS_ERR(res)) 406 406 return PTR_ERR(res); 407 407 ··· 621 621 622 622 struct dentry * 623 623 cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, 624 - struct nameidata *nd) 624 + unsigned int flags) 625 625 { 626 626 int xid; 627 627 int rc = 0; /* to get around spurious gcc warning, set to zero here */
+2 -2
fs/coda/dir.c
··· 31 31 32 32 /* dir inode-ops */ 33 33 static int coda_create(struct inode *dir, struct dentry *new, umode_t mode, struct nameidata *nd); 34 - static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, struct nameidata *nd); 34 + static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, unsigned int flags); 35 35 static int coda_link(struct dentry *old_dentry, struct inode *dir_inode, 36 36 struct dentry *entry); 37 37 static int coda_unlink(struct inode *dir_inode, struct dentry *entry); ··· 94 94 95 95 /* inode operations for directories */ 96 96 /* access routines: lookup, readlink, permission */ 97 - static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, struct nameidata *nd) 97 + static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, unsigned int flags) 98 98 { 99 99 struct super_block *sb = dir->i_sb; 100 100 const char *name = entry->d_name.name;
+1 -1
fs/configfs/dir.c
··· 442 442 443 443 static struct dentry * configfs_lookup(struct inode *dir, 444 444 struct dentry *dentry, 445 - struct nameidata *nd) 445 + unsigned int flags) 446 446 { 447 447 struct configfs_dirent * parent_sd = dentry->d_parent->d_fsdata; 448 448 struct configfs_dirent * sd;
+1 -1
fs/cramfs/inode.c
··· 417 417 /* 418 418 * Lookup and fill in the inode data.. 419 419 */ 420 - static struct dentry * cramfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 420 + static struct dentry * cramfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 421 421 { 422 422 unsigned int offset = 0; 423 423 struct inode *inode = NULL;
+1 -1
fs/ecryptfs/inode.c
··· 374 374 */ 375 375 static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, 376 376 struct dentry *ecryptfs_dentry, 377 - struct nameidata *ecryptfs_nd) 377 + unsigned int flags) 378 378 { 379 379 char *encrypted_and_encoded_name = NULL; 380 380 size_t encrypted_and_encoded_name_size;
+1 -1
fs/efs/efs.h
··· 129 129 extern efs_block_t efs_map_block(struct inode *, efs_block_t); 130 130 extern int efs_get_block(struct inode *, sector_t, struct buffer_head *, int); 131 131 132 - extern struct dentry *efs_lookup(struct inode *, struct dentry *, struct nameidata *); 132 + extern struct dentry *efs_lookup(struct inode *, struct dentry *, unsigned int); 133 133 extern struct dentry *efs_fh_to_dentry(struct super_block *sb, struct fid *fid, 134 134 int fh_len, int fh_type); 135 135 extern struct dentry *efs_fh_to_parent(struct super_block *sb, struct fid *fid,
+2 -1
fs/efs/namei.c
··· 58 58 return(0); 59 59 } 60 60 61 - struct dentry *efs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) { 61 + struct dentry *efs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 62 + { 62 63 efs_ino_t inodenum; 63 64 struct inode *inode = NULL; 64 65
+1 -1
fs/exofs/namei.c
··· 46 46 } 47 47 48 48 static struct dentry *exofs_lookup(struct inode *dir, struct dentry *dentry, 49 - struct nameidata *nd) 49 + unsigned int flags) 50 50 { 51 51 struct inode *inode; 52 52 ino_t ino;
+1 -1
fs/ext2/namei.c
··· 55 55 * Methods themselves. 56 56 */ 57 57 58 - static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) 58 + static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) 59 59 { 60 60 struct inode * inode; 61 61 ino_t ino;
+1 -1
fs/ext3/namei.c
··· 1011 1011 return NULL; 1012 1012 } 1013 1013 1014 - static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) 1014 + static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) 1015 1015 { 1016 1016 struct inode * inode; 1017 1017 struct ext3_dir_entry_2 * de;
+1 -1
fs/ext4/namei.c
··· 1312 1312 return NULL; 1313 1313 } 1314 1314 1315 - static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 1315 + static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 1316 1316 { 1317 1317 struct inode *inode; 1318 1318 struct ext4_dir_entry_2 *de;
+1 -1
fs/fat/namei_msdos.c
··· 201 201 202 202 /***** Get inode using directory and name */ 203 203 static struct dentry *msdos_lookup(struct inode *dir, struct dentry *dentry, 204 - struct nameidata *nd) 204 + unsigned int flags) 205 205 { 206 206 struct super_block *sb = dir->i_sb; 207 207 struct fat_slot_info sinfo;
+1 -1
fs/fat/namei_vfat.c
··· 714 714 } 715 715 716 716 static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry, 717 - struct nameidata *nd) 717 + unsigned int flags) 718 718 { 719 719 struct super_block *sb = dir->i_sb; 720 720 struct fat_slot_info sinfo;
+2 -2
fs/freevxfs/vxfs_lookup.c
··· 48 48 #define VXFS_BLOCK_PER_PAGE(sbp) ((PAGE_CACHE_SIZE / (sbp)->s_blocksize)) 49 49 50 50 51 - static struct dentry * vxfs_lookup(struct inode *, struct dentry *, struct nameidata *); 51 + static struct dentry * vxfs_lookup(struct inode *, struct dentry *, unsigned int); 52 52 static int vxfs_readdir(struct file *, void *, filldir_t); 53 53 54 54 const struct inode_operations vxfs_dir_inode_ops = { ··· 203 203 * in the return pointer. 204 204 */ 205 205 static struct dentry * 206 - vxfs_lookup(struct inode *dip, struct dentry *dp, struct nameidata *nd) 206 + vxfs_lookup(struct inode *dip, struct dentry *dp, unsigned int flags) 207 207 { 208 208 struct inode *ip = NULL; 209 209 ino_t ino;
+2 -2
fs/fuse/dir.c
··· 316 316 } 317 317 318 318 static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry, 319 - struct nameidata *nd) 319 + unsigned int flags) 320 320 { 321 321 int err; 322 322 struct fuse_entry_out outarg; ··· 478 478 struct dentry *res = NULL; 479 479 480 480 if (d_unhashed(entry)) { 481 - res = fuse_lookup(dir, entry, NULL); 481 + res = fuse_lookup(dir, entry, 0); 482 482 if (IS_ERR(res)) 483 483 return PTR_ERR(res); 484 484
+1 -1
fs/gfs2/inode.c
··· 775 775 */ 776 776 777 777 static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry, 778 - struct nameidata *nd) 778 + unsigned int flags) 779 779 { 780 780 struct inode *inode = gfs2_lookupi(dir, &dentry->d_name, 0); 781 781 if (inode && !IS_ERR(inode)) {
+1 -1
fs/hfs/dir.c
··· 18 18 * hfs_lookup() 19 19 */ 20 20 static struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry, 21 - struct nameidata *nd) 21 + unsigned int flags) 22 22 { 23 23 hfs_cat_rec rec; 24 24 struct hfs_find_data fd;
+1 -1
fs/hfs/inode.c
··· 489 489 } 490 490 491 491 static struct dentry *hfs_file_lookup(struct inode *dir, struct dentry *dentry, 492 - struct nameidata *nd) 492 + unsigned int flags) 493 493 { 494 494 struct inode *inode = NULL; 495 495 hfs_cat_rec rec;
+1 -1
fs/hfsplus/dir.c
··· 25 25 26 26 /* Find the entry inside dir named dentry->d_name */ 27 27 static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, 28 - struct nameidata *nd) 28 + unsigned int flags) 29 29 { 30 30 struct inode *inode = NULL; 31 31 struct hfs_find_data fd;
+1 -1
fs/hfsplus/inode.c
··· 168 168 }; 169 169 170 170 static struct dentry *hfsplus_file_lookup(struct inode *dir, 171 - struct dentry *dentry, struct nameidata *nd) 171 + struct dentry *dentry, unsigned int flags) 172 172 { 173 173 struct hfs_find_data fd; 174 174 struct super_block *sb = dir->i_sb;
+1 -1
fs/hostfs/hostfs_kern.c
··· 595 595 } 596 596 597 597 struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry, 598 - struct nameidata *nd) 598 + unsigned int flags) 599 599 { 600 600 struct inode *inode; 601 601 char *name;
+1 -1
fs/hpfs/dir.c
··· 189 189 * to tell read_inode to read fnode or not. 190 190 */ 191 191 192 - struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 192 + struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 193 193 { 194 194 const unsigned char *name = dentry->d_name.name; 195 195 unsigned len = dentry->d_name.len;
+1 -1
fs/hpfs/hpfs_fn.h
··· 220 220 221 221 /* dir.c */ 222 222 223 - struct dentry *hpfs_lookup(struct inode *, struct dentry *, struct nameidata *); 223 + struct dentry *hpfs_lookup(struct inode *, struct dentry *, unsigned int); 224 224 extern const struct file_operations hpfs_dir_ops; 225 225 226 226 /* dnode.c */
+1 -1
fs/hppfs/hppfs.c
··· 138 138 } 139 139 140 140 static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry, 141 - struct nameidata *nd) 141 + unsigned int flags) 142 142 { 143 143 struct dentry *proc_dentry, *parent; 144 144 struct qstr *name = &dentry->d_name;
+1 -1
fs/isofs/isofs.h
··· 114 114 int get_joliet_filename(struct iso_directory_record *, unsigned char *, struct inode *); 115 115 int get_acorn_filename(struct iso_directory_record *, char *, struct inode *); 116 116 117 - extern struct dentry *isofs_lookup(struct inode *, struct dentry *, struct nameidata *); 117 + extern struct dentry *isofs_lookup(struct inode *, struct dentry *, unsigned int flags); 118 118 extern struct buffer_head *isofs_bread(struct inode *, sector_t); 119 119 extern int isofs_get_blocks(struct inode *, sector_t, struct buffer_head **, unsigned long); 120 120
+1 -1
fs/isofs/namei.c
··· 163 163 return 0; 164 164 } 165 165 166 - struct dentry *isofs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 166 + struct dentry *isofs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 167 167 { 168 168 int found; 169 169 unsigned long uninitialized_var(block);
+2 -2
fs/jffs2/dir.c
··· 27 27 static int jffs2_create (struct inode *,struct dentry *,umode_t, 28 28 struct nameidata *); 29 29 static struct dentry *jffs2_lookup (struct inode *,struct dentry *, 30 - struct nameidata *); 30 + unsigned int); 31 31 static int jffs2_link (struct dentry *,struct inode *,struct dentry *); 32 32 static int jffs2_unlink (struct inode *,struct dentry *); 33 33 static int jffs2_symlink (struct inode *,struct dentry *,const char *); ··· 74 74 nice and simple 75 75 */ 76 76 static struct dentry *jffs2_lookup(struct inode *dir_i, struct dentry *target, 77 - struct nameidata *nd) 77 + unsigned int flags) 78 78 { 79 79 struct jffs2_inode_info *dir_f; 80 80 struct jffs2_full_dirent *fd = NULL, *fd_list;
+1 -1
fs/jfs/namei.c
··· 1436 1436 return rc; 1437 1437 } 1438 1438 1439 - static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struct nameidata *nd) 1439 + static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, unsigned int flags) 1440 1440 { 1441 1441 struct btstack btstack; 1442 1442 ino_t inum;
+1 -1
fs/libfs.c
··· 53 53 * Lookup the data. This is trivial - if the dentry didn't already 54 54 * exist, we know it is negative. Set d_op to delete negative dentries. 55 55 */ 56 - struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 56 + struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 57 57 { 58 58 static const struct dentry_operations simple_dentry_operations = { 59 59 .d_delete = simple_delete_dentry,
+1 -1
fs/logfs/dir.c
··· 349 349 } 350 350 351 351 static struct dentry *logfs_lookup(struct inode *dir, struct dentry *dentry, 352 - struct nameidata *nd) 352 + unsigned int flags) 353 353 { 354 354 struct page *page; 355 355 struct logfs_disk_dentry *dd;
+1 -1
fs/minix/namei.c
··· 18 18 return err; 19 19 } 20 20 21 - static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) 21 + static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) 22 22 { 23 23 struct inode * inode = NULL; 24 24 ino_t ino;
+1 -1
fs/namei.c
··· 1090 1090 return ERR_PTR(-ENOENT); 1091 1091 } 1092 1092 1093 - old = dir->i_op->lookup(dir, dentry, nd); 1093 + old = dir->i_op->lookup(dir, dentry, nd ? nd->flags : 0); 1094 1094 if (unlikely(old)) { 1095 1095 dput(dentry); 1096 1096 dentry = old;
+2 -2
fs/ncpfs/dir.c
··· 31 31 static int ncp_readdir(struct file *, void *, filldir_t); 32 32 33 33 static int ncp_create(struct inode *, struct dentry *, umode_t, struct nameidata *); 34 - static struct dentry *ncp_lookup(struct inode *, struct dentry *, struct nameidata *); 34 + static struct dentry *ncp_lookup(struct inode *, struct dentry *, unsigned int); 35 35 static int ncp_unlink(struct inode *, struct dentry *); 36 36 static int ncp_mkdir(struct inode *, struct dentry *, umode_t); 37 37 static int ncp_rmdir(struct inode *, struct dentry *); ··· 836 836 return result; 837 837 } 838 838 839 - static struct dentry *ncp_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 839 + static struct dentry *ncp_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 840 840 { 841 841 struct ncp_server *server = NCP_SERVER(dir); 842 842 struct inode *inode = NULL;
+4 -4
fs/nfs/dir.c
··· 46 46 static int nfs_opendir(struct inode *, struct file *); 47 47 static int nfs_closedir(struct inode *, struct file *); 48 48 static int nfs_readdir(struct file *, void *, filldir_t); 49 - static struct dentry *nfs_lookup(struct inode *, struct dentry *, struct nameidata *); 49 + static struct dentry *nfs_lookup(struct inode *, struct dentry *, unsigned int); 50 50 static int nfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *); 51 51 static int nfs_mkdir(struct inode *, struct dentry *, umode_t); 52 52 static int nfs_rmdir(struct inode *, struct dentry *); ··· 1270 1270 .d_release = nfs_d_release, 1271 1271 }; 1272 1272 1273 - static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) 1273 + static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags) 1274 1274 { 1275 1275 struct dentry *res; 1276 1276 struct dentry *parent; ··· 1291 1291 * If we're doing an exclusive create, optimize away the lookup 1292 1292 * but don't hash the dentry. 1293 1293 */ 1294 - if (nd && nfs_is_exclusive_create(dir, nd->flags)) { 1294 + if (nfs_is_exclusive_create(dir, flags)) { 1295 1295 d_instantiate(dentry, NULL); 1296 1296 res = NULL; 1297 1297 goto out; ··· 1482 1482 return err; 1483 1483 1484 1484 no_open: 1485 - res = nfs_lookup(dir, dentry, NULL); 1485 + res = nfs_lookup(dir, dentry, 0); 1486 1486 err = PTR_ERR(res); 1487 1487 if (IS_ERR(res)) 1488 1488 goto out;
+1 -1
fs/nilfs2/namei.c
··· 63 63 */ 64 64 65 65 static struct dentry * 66 - nilfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 66 + nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 67 67 { 68 68 struct inode *inode; 69 69 ino_t ino;
+1 -1
fs/ntfs/namei.c
··· 101 101 * Locking: Caller must hold i_mutex on the directory. 102 102 */ 103 103 static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent, 104 - struct nameidata *nd) 104 + unsigned int flags) 105 105 { 106 106 ntfs_volume *vol = NTFS_SB(dir_ino->i_sb); 107 107 struct inode *dent_inode;
+1 -1
fs/ocfs2/namei.c
··· 98 98 #define OCFS2_ORPHAN_NAMELEN ((int)(2 * sizeof(u64))) 99 99 100 100 static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry, 101 - struct nameidata *nd) 101 + unsigned int flags) 102 102 { 103 103 int status; 104 104 u64 blkno;
+1 -1
fs/omfs/dir.c
··· 291 291 } 292 292 293 293 static struct dentry *omfs_lookup(struct inode *dir, struct dentry *dentry, 294 - struct nameidata *nd) 294 + unsigned int flags) 295 295 { 296 296 struct buffer_head *bh; 297 297 struct inode *inode = NULL;
+2 -2
fs/openpromfs/inode.c
··· 170 170 .llseek = generic_file_llseek, 171 171 }; 172 172 173 - static struct dentry *openpromfs_lookup(struct inode *, struct dentry *, struct nameidata *); 173 + static struct dentry *openpromfs_lookup(struct inode *, struct dentry *, unsigned int); 174 174 175 175 static const struct inode_operations openprom_inode_operations = { 176 176 .lookup = openpromfs_lookup, 177 177 }; 178 178 179 - static struct dentry *openpromfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 179 + static struct dentry *openpromfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 180 180 { 181 181 struct op_inode_info *ent_oi, *oi = OP_I(dir); 182 182 struct device_node *dp, *child;
+10 -8
fs/proc/base.c
··· 1956 1956 } 1957 1957 1958 1958 static struct dentry *proc_lookupfd(struct inode *dir, struct dentry *dentry, 1959 - struct nameidata *nd) 1959 + unsigned int flags) 1960 1960 { 1961 1961 return proc_lookupfd_common(dir, dentry, proc_fd_instantiate); 1962 1962 } ··· 2145 2145 } 2146 2146 2147 2147 static struct dentry *proc_map_files_lookup(struct inode *dir, 2148 - struct dentry *dentry, struct nameidata *nd) 2148 + struct dentry *dentry, unsigned int flags) 2149 2149 { 2150 2150 unsigned long vm_start, vm_end; 2151 2151 struct vm_area_struct *vma; ··· 2380 2380 2381 2381 static struct dentry *proc_lookupfdinfo(struct inode *dir, 2382 2382 struct dentry *dentry, 2383 - struct nameidata *nd) 2383 + unsigned int flags) 2384 2384 { 2385 2385 return proc_lookupfd_common(dir, dentry, proc_fdinfo_instantiate); 2386 2386 } ··· 2630 2630 }; 2631 2631 2632 2632 static struct dentry *proc_attr_dir_lookup(struct inode *dir, 2633 - struct dentry *dentry, struct nameidata *nd) 2633 + struct dentry *dentry, unsigned int flags) 2634 2634 { 2635 2635 return proc_pident_lookup(dir, dentry, 2636 2636 attr_dir_stuff, ARRAY_SIZE(attr_dir_stuff)); ··· 3114 3114 .llseek = default_llseek, 3115 3115 }; 3116 3116 3117 - static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){ 3117 + static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 3118 + { 3118 3119 return proc_pident_lookup(dir, dentry, 3119 3120 tgid_base_stuff, ARRAY_SIZE(tgid_base_stuff)); 3120 3121 } ··· 3244 3243 return error; 3245 3244 } 3246 3245 3247 - struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) 3246 + struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags) 3248 3247 { 3249 3248 struct dentry *result; 3250 3249 struct task_struct *task; ··· 3471 3470 tid_base_stuff,ARRAY_SIZE(tid_base_stuff)); 3472 3471 } 3473 3472 3474 - static struct dentry *proc_tid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){ 3473 + static struct dentry *proc_tid_base_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 3474 + { 3475 3475 return proc_pident_lookup(dir, dentry, 3476 3476 tid_base_stuff, ARRAY_SIZE(tid_base_stuff)); 3477 3477 } ··· 3516 3514 return error; 3517 3515 } 3518 3516 3519 - static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) 3517 + static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags) 3520 3518 { 3521 3519 struct dentry *result = ERR_PTR(-ENOENT); 3522 3520 struct task_struct *task;
+1 -1
fs/proc/generic.c
··· 446 446 } 447 447 448 448 struct dentry *proc_lookup(struct inode *dir, struct dentry *dentry, 449 - struct nameidata *nd) 449 + unsigned int flags) 450 450 { 451 451 return proc_lookup_de(PDE(dir), dir, dentry); 452 452 }
+2 -2
fs/proc/internal.h
··· 106 106 107 107 extern spinlock_t proc_subdir_lock; 108 108 109 - struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); 109 + struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsigned int); 110 110 int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); 111 111 unsigned long task_vsize(struct mm_struct *); 112 112 unsigned long task_statm(struct mm_struct *, ··· 132 132 * of the /proc/<pid> subdirectories. 133 133 */ 134 134 int proc_readdir(struct file *, void *, filldir_t); 135 - struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *); 135 + struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int); 136 136 137 137 138 138
+1 -1
fs/proc/namespaces.c
··· 140 140 }; 141 141 142 142 static struct dentry *proc_ns_dir_lookup(struct inode *dir, 143 - struct dentry *dentry, struct nameidata *nd) 143 + struct dentry *dentry, unsigned int flags) 144 144 { 145 145 struct dentry *error; 146 146 struct task_struct *task = get_proc_task(dir);
+1 -1
fs/proc/proc_net.c
··· 119 119 } 120 120 121 121 static struct dentry *proc_tgid_net_lookup(struct inode *dir, 122 - struct dentry *dentry, struct nameidata *nd) 122 + struct dentry *dentry, unsigned int flags) 123 123 { 124 124 struct dentry *de; 125 125 struct net *net;
+1 -1
fs/proc/proc_sysctl.c
··· 433 433 } 434 434 435 435 static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry, 436 - struct nameidata *nd) 436 + unsigned int flags) 437 437 { 438 438 struct ctl_table_header *head = grab_header(dir); 439 439 struct ctl_table_header *h = NULL;
+3 -4
fs/proc/root.c
··· 200 200 return 0; 201 201 } 202 202 203 - static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd) 203 + static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags) 204 204 { 205 - if (!proc_lookup(dir, dentry, nd)) { 205 + if (!proc_lookup(dir, dentry, flags)) 206 206 return NULL; 207 - } 208 207 209 - return proc_pid_lookup(dir, dentry, nd); 208 + return proc_pid_lookup(dir, dentry, flags); 210 209 } 211 210 212 211 static int proc_root_readdir(struct file * filp,
+1 -1
fs/qnx4/namei.c
··· 95 95 return NULL; 96 96 } 97 97 98 - struct dentry * qnx4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 98 + struct dentry * qnx4_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 99 99 { 100 100 int ino; 101 101 struct qnx4_inode_entry *de;
+1 -1
fs/qnx4/qnx4.h
··· 23 23 }; 24 24 25 25 extern struct inode *qnx4_iget(struct super_block *, unsigned long); 26 - extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd); 26 + extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags); 27 27 extern unsigned long qnx4_count_free_blocks(struct super_block *sb); 28 28 extern unsigned long qnx4_block_map(struct inode *inode, long iblock); 29 29
+1 -1
fs/qnx6/namei.c
··· 13 13 #include "qnx6.h" 14 14 15 15 struct dentry *qnx6_lookup(struct inode *dir, struct dentry *dentry, 16 - struct nameidata *nd) 16 + unsigned int flags) 17 17 { 18 18 unsigned ino; 19 19 struct page *page;
+1 -1
fs/qnx6/qnx6.h
··· 45 45 46 46 extern struct inode *qnx6_iget(struct super_block *sb, unsigned ino); 47 47 extern struct dentry *qnx6_lookup(struct inode *dir, struct dentry *dentry, 48 - struct nameidata *nd); 48 + unsigned int flags); 49 49 50 50 #ifdef CONFIG_QNX6FS_DEBUG 51 51 extern void qnx6_superblock_debug(struct qnx6_super_block *,
+1 -1
fs/reiserfs/namei.c
··· 322 322 } 323 323 324 324 static struct dentry *reiserfs_lookup(struct inode *dir, struct dentry *dentry, 325 - struct nameidata *nd) 325 + unsigned int flags) 326 326 { 327 327 int retval; 328 328 int lock_depth;
+1 -1
fs/romfs/super.c
··· 210 210 * look up an entry in a directory 211 211 */ 212 212 static struct dentry *romfs_lookup(struct inode *dir, struct dentry *dentry, 213 - struct nameidata *nd) 213 + unsigned int flags) 214 214 { 215 215 unsigned long offset, maxoff; 216 216 struct inode *inode;
+1 -1
fs/squashfs/namei.c
··· 134 134 135 135 136 136 static struct dentry *squashfs_lookup(struct inode *dir, struct dentry *dentry, 137 - struct nameidata *nd) 137 + unsigned int flags) 138 138 { 139 139 const unsigned char *name = dentry->d_name.name; 140 140 int len = dentry->d_name.len;
+1 -1
fs/sysfs/dir.c
··· 764 764 } 765 765 766 766 static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry, 767 - struct nameidata *nd) 767 + unsigned int flags) 768 768 { 769 769 struct dentry *ret = NULL; 770 770 struct dentry *parent = dentry->d_parent;
+1 -1
fs/sysv/namei.c
··· 43 43 .d_hash = sysv_hash, 44 44 }; 45 45 46 - static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd) 46 + static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags) 47 47 { 48 48 struct inode * inode = NULL; 49 49 ino_t ino;
+1 -1
fs/ubifs/dir.c
··· 184 184 } 185 185 186 186 static struct dentry *ubifs_lookup(struct inode *dir, struct dentry *dentry, 187 - struct nameidata *nd) 187 + unsigned int flags) 188 188 { 189 189 int err; 190 190 union ubifs_key key;
+1 -1
fs/udf/namei.c
··· 251 251 } 252 252 253 253 static struct dentry *udf_lookup(struct inode *dir, struct dentry *dentry, 254 - struct nameidata *nd) 254 + unsigned int flags) 255 255 { 256 256 struct inode *inode = NULL; 257 257 struct fileIdentDesc cfi;
+1 -1
fs/ufs/namei.c
··· 46 46 return err; 47 47 } 48 48 49 - static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) 49 + static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) 50 50 { 51 51 struct inode * inode = NULL; 52 52 ino_t ino;
+2 -2
fs/xfs/xfs_iops.c
··· 197 197 xfs_vn_lookup( 198 198 struct inode *dir, 199 199 struct dentry *dentry, 200 - struct nameidata *nd) 200 + unsigned int flags) 201 201 { 202 202 struct xfs_inode *cip; 203 203 struct xfs_name name; ··· 222 222 xfs_vn_ci_lookup( 223 223 struct inode *dir, 224 224 struct dentry *dentry, 225 - struct nameidata *nd) 225 + unsigned int flags) 226 226 { 227 227 struct xfs_inode *ip; 228 228 struct xfs_name xname;
+2 -2
include/linux/fs.h
··· 1666 1666 }; 1667 1667 1668 1668 struct inode_operations { 1669 - struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); 1669 + struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); 1670 1670 void * (*follow_link) (struct dentry *, struct nameidata *); 1671 1671 int (*permission) (struct inode *, int); 1672 1672 struct posix_acl * (*get_acl)(struct inode *, int); ··· 2571 2571 loff_t pos, unsigned len, unsigned copied, 2572 2572 struct page *page, void *fsdata); 2573 2573 2574 - extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); 2574 + extern struct dentry *simple_lookup(struct inode *, struct dentry *, unsigned int flags); 2575 2575 extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); 2576 2576 extern const struct file_operations simple_dir_operations; 2577 2577 extern const struct inode_operations simple_dir_inode_operations;
+2 -2
kernel/cgroup.c
··· 822 822 */ 823 823 824 824 static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); 825 - static struct dentry *cgroup_lookup(struct inode *, struct dentry *, struct nameidata *); 825 + static struct dentry *cgroup_lookup(struct inode *, struct dentry *, unsigned int); 826 826 static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry); 827 827 static int cgroup_populate_dir(struct cgroup *cgrp); 828 828 static const struct inode_operations cgroup_dir_inode_operations; ··· 2570 2570 .rename = cgroup_rename, 2571 2571 }; 2572 2572 2573 - static struct dentry *cgroup_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 2573 + static struct dentry *cgroup_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) 2574 2574 { 2575 2575 if (dentry->d_name.len > NAME_MAX) 2576 2576 return ERR_PTR(-ENAMETOOLONG);