Home
last modified time | relevance | path

Searched refs:nd (Results 1 – 25 of 101) sorted by relevance

12345

/fs/
Dnamei.c109 static int __link_path_walk(const char *name, struct nameidata *nd);
369 void release_open_intent(struct nameidata *nd) in release_open_intent() argument
371 if (nd->intent.open.file->f_path.dentry == NULL) in release_open_intent()
372 put_filp(nd->intent.open.file); in release_open_intent()
374 fput(nd->intent.open.file); in release_open_intent()
378 do_revalidate(struct dentry *dentry, struct nameidata *nd) in do_revalidate() argument
380 int status = dentry->d_op->d_revalidate(dentry, nd); in do_revalidate()
405 …tic struct dentry * cached_lookup(struct dentry * parent, struct qstr * name, struct nameidata *nd) in cached_lookup() argument
416 dentry = do_revalidate(dentry, nd); in cached_lookup()
468 static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, struct nameidata *nd) in real_lookup() argument
[all …]
Dnfsctl.c27 struct nameidata nd; in do_open() local
35 error = vfs_path_lookup(mnt->mnt_root, mnt, name, 0, &nd); in do_open()
41 error = may_open(&nd.path, MAY_READ|MAY_WRITE, in do_open()
44 error = may_open(&nd.path, MAY_WRITE, FMODE_WRITE); in do_open()
47 return dentry_open(nd.path.dentry, nd.path.mnt, flags, in do_open()
50 path_put(&nd.path); in do_open()
Dopen.c904 struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, in lookup_instantiate_filp() argument
909 if (IS_ERR(nd->intent.open.file)) in lookup_instantiate_filp()
913 nd->intent.open.file = __dentry_open(dget(dentry), mntget(nd->path.mnt), in lookup_instantiate_filp()
914 nd->intent.open.flags - 1, in lookup_instantiate_filp()
915 nd->intent.open.file, in lookup_instantiate_filp()
918 return nd->intent.open.file; in lookup_instantiate_filp()
920 release_open_intent(nd); in lookup_instantiate_filp()
921 nd->intent.open.file = (struct file *)dentry; in lookup_instantiate_filp()
933 struct file *nameidata_to_filp(struct nameidata *nd, int flags) in nameidata_to_filp() argument
939 filp = nd->intent.open.file; in nameidata_to_filp()
[all …]
/fs/autofs4/
Ddev-ioctl.c201 static int autofs_dev_ioctl_find_super(struct nameidata *nd, dev_t devno) in autofs_dev_ioctl_find_super() argument
212 dentry = d_lookup(nd->path.dentry, &nd->last); in autofs_dev_ioctl_find_super()
216 dput(nd->path.dentry); in autofs_dev_ioctl_find_super()
217 nd->path.dentry = dentry; in autofs_dev_ioctl_find_super()
220 while (follow_down(&nd->path.mnt, &nd->path.dentry)) { in autofs_dev_ioctl_find_super()
221 inode = nd->path.dentry->d_inode; in autofs_dev_ioctl_find_super()
242 static int autofs_dev_ioctl_find_sbi_type(struct nameidata *nd, unsigned int type) in autofs_dev_ioctl_find_sbi_type() argument
251 dentry = d_lookup(nd->path.dentry, &nd->last); in autofs_dev_ioctl_find_sbi_type()
255 dput(nd->path.dentry); in autofs_dev_ioctl_find_sbi_type()
256 nd->path.dentry = dentry; in autofs_dev_ioctl_find_sbi_type()
[all …]
Droot.c171 static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) in autofs4_follow_link() argument
181 nd->flags); in autofs4_follow_link()
193 if (!follow_down(&nd->path.mnt, &nd->path.dentry)) in autofs4_follow_link()
205 lookup_type = nd->flags & (TRIGGER_FLAGS | TRIGGER_INTENTS); in autofs4_follow_link()
233 if (!autofs4_follow_mount(&nd->path.mnt, in autofs4_follow_link()
234 &nd->path.dentry)) { in autofs4_follow_link()
244 path_put(&nd->path); in autofs4_follow_link()
254 static int autofs4_revalidate(struct dentry *dentry, struct nameidata *nd) in autofs4_revalidate() argument
259 int flags = nd ? nd->flags : 0; in autofs4_revalidate()
468 static struct dentry *autofs4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) in autofs4_lookup() argument
[all …]
Dsymlink.c15 static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) in autofs4_follow_link() argument
18 nd_set_link(nd, (char *)ino->u.symlink); in autofs4_follow_link()
/fs/nfs/
Dnamespace.c97 static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) in nfs_follow_mountpoint() argument
113 dput(nd->path.dentry); in nfs_follow_mountpoint()
114 nd->path.dentry = dget(dentry); in nfs_follow_mountpoint()
117 parent = dget_parent(nd->path.dentry); in nfs_follow_mountpoint()
119 &nd->path.dentry->d_name, in nfs_follow_mountpoint()
126 mnt = nfs_do_refmount(nd->path.mnt, nd->path.dentry); in nfs_follow_mountpoint()
128 mnt = nfs_do_submount(nd->path.mnt, nd->path.dentry, &fh, in nfs_follow_mountpoint()
135 err = do_add_mount(mnt, &nd->path, nd->path.mnt->mnt_flags|MNT_SHRINKABLE, in nfs_follow_mountpoint()
143 path_put(&nd->path); in nfs_follow_mountpoint()
144 nd->path.mnt = mnt; in nfs_follow_mountpoint()
[all …]
Ddir.c695 static inline unsigned int nfs_lookup_check_intent(struct nameidata *nd, unsigned int mask) in nfs_lookup_check_intent() argument
697 if (nd->flags & (LOOKUP_CONTINUE|LOOKUP_PARENT)) in nfs_lookup_check_intent()
699 return nd->flags & mask; in nfs_lookup_check_intent()
706 static int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd) in nfs_is_exclusive_create() argument
710 return nd && nfs_lookup_check_intent(nd, LOOKUP_EXCL); in nfs_is_exclusive_create()
722 int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd) in nfs_lookup_verify_inode() argument
728 if (nd != NULL) { in nfs_lookup_verify_inode()
730 if (nd->flags & LOOKUP_REVAL) in nfs_lookup_verify_inode()
733 if (nfs_lookup_check_intent(nd, LOOKUP_OPEN) != 0 && in nfs_lookup_verify_inode()
754 struct nameidata *nd) in nfs_neg_need_reval() argument
[all …]
Dsymlink.c47 static void *nfs_follow_link(struct dentry *dentry, struct nameidata *nd) in nfs_follow_link() argument
62 nd_set_link(nd, kmap(page)); in nfs_follow_link()
66 nd_set_link(nd, err); in nfs_follow_link()
/fs/afs/
Dmntpt.c26 struct nameidata *nd);
28 static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd);
106 struct nameidata *nd) in afs_mntpt_lookup() argument
213 static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) in afs_mntpt_follow_link() argument
221 nd->path.mnt->mnt_devname, in afs_mntpt_follow_link()
223 nd->path.dentry->d_name.name); in afs_mntpt_follow_link()
225 dput(nd->path.dentry); in afs_mntpt_follow_link()
226 nd->path.dentry = dget(dentry); in afs_mntpt_follow_link()
228 newmnt = afs_mntpt_do_automount(nd->path.dentry); in afs_mntpt_follow_link()
230 path_put(&nd->path); in afs_mntpt_follow_link()
[all …]
/fs/ecryptfs/
Ddentry.c44 static int ecryptfs_d_revalidate(struct dentry *dentry, struct nameidata *nd) in ecryptfs_d_revalidate() argument
54 dentry_save = nd->path.dentry; in ecryptfs_d_revalidate()
55 vfsmount_save = nd->path.mnt; in ecryptfs_d_revalidate()
56 nd->path.dentry = lower_dentry; in ecryptfs_d_revalidate()
57 nd->path.mnt = lower_mnt; in ecryptfs_d_revalidate()
58 rc = lower_dentry->d_op->d_revalidate(lower_dentry, nd); in ecryptfs_d_revalidate()
59 nd->path.dentry = dentry_save; in ecryptfs_d_revalidate()
60 nd->path.mnt = vfsmount_save; in ecryptfs_d_revalidate()
Dinode.c66 struct nameidata *nd) in ecryptfs_create_underlying_file() argument
74 dentry_save = nd->path.dentry; in ecryptfs_create_underlying_file()
75 vfsmount_save = nd->path.mnt; in ecryptfs_create_underlying_file()
76 nd->path.dentry = lower_dentry; in ecryptfs_create_underlying_file()
77 nd->path.mnt = lower_mnt; in ecryptfs_create_underlying_file()
78 rc = vfs_create(lower_dir_inode, lower_dentry, mode, nd); in ecryptfs_create_underlying_file()
79 nd->path.dentry = dentry_save; in ecryptfs_create_underlying_file()
80 nd->path.mnt = vfsmount_save; in ecryptfs_create_underlying_file()
100 struct nameidata *nd) in ecryptfs_do_create() argument
115 ecryptfs_dentry, mode, nd); in ecryptfs_do_create()
[all …]
/fs/cifs/
Dcifs_dfs_ref.c263 static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd, in add_mount_helper() argument
270 err = do_add_mount(newmnt, &nd->path, nd->path.mnt->mnt_flags, mntlist); in add_mount_helper()
273 path_put(&nd->path); in add_mount_helper()
274 nd->path.mnt = newmnt; in add_mount_helper()
275 nd->path.dentry = dget(newmnt->mnt_root); in add_mount_helper()
281 while (d_mountpoint(nd->path.dentry) && in add_mount_helper()
282 follow_down(&nd->path.mnt, &nd->path.dentry)) in add_mount_helper()
303 cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) in cifs_dfs_follow_mountpoint() argument
319 dput(nd->path.dentry); in cifs_dfs_follow_mountpoint()
320 nd->path.dentry = dget(dentry); in cifs_dfs_follow_mountpoint()
[all …]
Ddir.c219 struct nameidata *nd) in cifs_create() argument
259 if (nd && (nd->flags & LOOKUP_OPEN)) in cifs_create()
260 oflags = nd->intent.open.flags; in cifs_create()
287 if (nd && (nd->flags & LOOKUP_OPEN)) { in cifs_create()
407 if ((nd == NULL) || (!(nd->flags & LOOKUP_OPEN))) { in cifs_create()
584 struct nameidata *nd) in cifs_lookup() argument
673 cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd) in cifs_d_revalidate() argument
/fs/dlm/
Dconfig.c82 static ssize_t node_nodeid_read(struct dlm_node *nd, char *buf);
83 static ssize_t node_nodeid_write(struct dlm_node *nd, const char *buf,
85 static ssize_t node_weight_read(struct dlm_node *nd, char *buf);
86 static ssize_t node_weight_write(struct dlm_node *nd, const char *buf,
570 struct dlm_node *nd; in make_node() local
572 nd = kzalloc(sizeof(struct dlm_node), GFP_KERNEL); in make_node()
573 if (!nd) in make_node()
576 config_item_init_type_name(&nd->item, name, &node_type); in make_node()
577 nd->nodeid = -1; in make_node()
578 nd->weight = 1; /* default weight of 1 if none is set */ in make_node()
[all …]
/fs/smbfs/
Dsymlink.c35 static void *smb_follow_link(struct dentry *dentry, struct nameidata *nd) in smb_follow_link() argument
52 nd_set_link(nd, link); in smb_follow_link()
56 static void smb_put_link(struct dentry *dentry, struct nameidata *nd, void *p) in smb_put_link() argument
58 char *s = nd_get_link(nd); in smb_put_link()
/fs/jffs2/
Dsymlink.c18 static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd);
32 static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd) in jffs2_follow_link() argument
56 nd_set_link(nd, p); in jffs2_follow_link()
/fs/hpfs/
Ddnode.c230 struct dnode *d, *ad, *rd, *nd = NULL; in hpfs_add_to_dnode() local
247 kfree(nd); in hpfs_add_to_dnode()
252 kfree(nd); in hpfs_add_to_dnode()
260 kfree(nd); in hpfs_add_to_dnode()
273 kfree(nd); in hpfs_add_to_dnode()
277 if (!nd) if (!(nd = kmalloc(0x924, GFP_NOFS))) { in hpfs_add_to_dnode()
288 memcpy(nd, d, d->first_free); in hpfs_add_to_dnode()
289 copy_de(de = hpfs_add_de(i->i_sb, nd, name, namelen, down_ptr), new_de); in hpfs_add_to_dnode()
290 for_all_poss(i, hpfs_pos_ins, get_pos(nd, de), 1); in hpfs_add_to_dnode()
291 h = ((char *)dnode_last_de(nd) - (char *)nd) / 2 + 10; in hpfs_add_to_dnode()
[all …]
/fs/sysfs/
Dsymlink.c191 static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) in sysfs_follow_link() argument
197 nd_set_link(nd, error ? ERR_PTR(error) : (char *)page); in sysfs_follow_link()
201 static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) in sysfs_put_link() argument
203 char *page = nd_get_link(nd); in sysfs_put_link()
/fs/sysv/
Dsymlink.c11 static void *sysv_follow_link(struct dentry *dentry, struct nameidata *nd) in sysv_follow_link() argument
13 nd_set_link(nd, (char *)SYSV_I(dentry->d_inode)->i_data); in sysv_follow_link()
/fs/autofs/
Dsymlink.c16 static void *autofs_follow_link(struct dentry *dentry, struct nameidata *nd) in autofs_follow_link() argument
19 nd_set_link(nd, s); in autofs_follow_link()
/fs/ufs/
Dsymlink.c35 static void *ufs_follow_link(struct dentry *dentry, struct nameidata *nd) in ufs_follow_link() argument
38 nd_set_link(nd, (char*)p->i_u1.i_symlink); in ufs_follow_link()
/fs/jfs/
Dsymlink.c25 static void *jfs_follow_link(struct dentry *dentry, struct nameidata *nd) in jfs_follow_link() argument
28 nd_set_link(nd, s); in jfs_follow_link()
/fs/9p/
Dvfs_inode.c500 struct nameidata *nd) in v9fs_vfs_create() argument
513 if (nd && nd->flags & LOOKUP_OPEN) in v9fs_vfs_create()
514 flags = nd->intent.open.flags - 1; in v9fs_vfs_create()
527 if (nd && nd->flags & LOOKUP_OPEN) { in v9fs_vfs_create()
528 filp = lookup_instantiate_filp(nd, dentry, v9fs_open_created); in v9fs_vfs_create()
990 static void *v9fs_vfs_follow_link(struct dentry *dentry, struct nameidata *nd) in v9fs_vfs_follow_link() argument
1008 nd_set_link(nd, link); in v9fs_vfs_follow_link()
1022 v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p) in v9fs_vfs_put_link() argument
1024 char *s = nd_get_link(nd); in v9fs_vfs_put_link()
/fs/ext4/
Dsymlink.c26 static void *ext4_follow_link(struct dentry *dentry, struct nameidata *nd) in ext4_follow_link() argument
29 nd_set_link(nd, (char *) ei->i_data); in ext4_follow_link()

12345