Lines Matching refs:dentry

33 static int ncp_create(struct inode *, struct dentry *, umode_t, bool);
34 static struct dentry *ncp_lookup(struct inode *, struct dentry *, unsigned int);
35 static int ncp_unlink(struct inode *, struct dentry *);
36 static int ncp_mkdir(struct inode *, struct dentry *, umode_t);
37 static int ncp_rmdir(struct inode *, struct dentry *);
38 static int ncp_rename(struct inode *, struct dentry *,
39 struct inode *, struct dentry *);
40 static int ncp_mknod(struct inode * dir, struct dentry *dentry,
43 extern int ncp_symlink(struct inode *, struct dentry *, const char *);
75 static int ncp_lookup_validate(struct dentry *, unsigned int);
76 static int ncp_hash_dentry(const struct dentry *, struct qstr *);
77 static int ncp_compare_dentry(const struct dentry *, const struct dentry *,
79 static int ncp_delete_dentry(const struct dentry *);
80 static void ncp_d_prune(struct dentry *dentry);
128 ncp_hash_dentry(const struct dentry *dentry, struct qstr *this) in ncp_hash_dentry() argument
130 struct inode *inode = d_inode_rcu(dentry); in ncp_hash_dentry()
136 struct super_block *sb = dentry->d_sb; in ncp_hash_dentry()
157 ncp_compare_dentry(const struct dentry *parent, const struct dentry *dentry, in ncp_compare_dentry() argument
181 ncp_delete_dentry(const struct dentry * dentry) in ncp_delete_dentry() argument
183 struct inode *inode = d_inode(dentry); in ncp_delete_dentry()
217 ncp_force_unlink(struct inode *dir, struct dentry* dentry) in ncp_force_unlink() argument
227 inode = d_inode(dentry); in ncp_force_unlink()
236 res = ncp_del_file_or_subdir2(NCP_SERVER(dir), dentry); in ncp_force_unlink()
252 ncp_force_rename(struct inode *old_dir, struct dentry* old_dentry, char *_old_name, in ncp_force_rename()
253 struct inode *new_dir, struct dentry* new_dentry, char *_new_name) in ncp_force_rename()
311 ncp_lookup_validate(struct dentry *dentry, unsigned int flags) in ncp_lookup_validate() argument
314 struct dentry *parent; in ncp_lookup_validate()
320 if (dentry == dentry->d_sb->s_root) in ncp_lookup_validate()
326 parent = dget_parent(dentry); in ncp_lookup_validate()
329 if (d_really_is_negative(dentry)) in ncp_lookup_validate()
340 val = NCP_TEST_AGE(server, dentry); in ncp_lookup_validate()
345 dentry, NCP_GET_AGE(dentry)); in ncp_lookup_validate()
349 res = ncp_io2vol(server, __name, &len, dentry->d_name.name, in ncp_lookup_validate()
350 dentry->d_name.len, 1); in ncp_lookup_validate()
357 res = ncp_io2vol(server, __name, &len, dentry->d_name.name, in ncp_lookup_validate()
358 dentry->d_name.len, !ncp_preserve_case(dir)); in ncp_lookup_validate()
364 dentry->d_parent, __name, res); in ncp_lookup_validate()
370 struct inode *inode = d_inode(dentry); in ncp_lookup_validate()
374 ncp_new_dentry(dentry); in ncp_lookup_validate()
389 static time_t ncp_obtain_mtime(struct dentry *dentry) in ncp_obtain_mtime() argument
391 struct inode *inode = d_inode(dentry); in ncp_obtain_mtime()
405 ncp_invalidate_dircache_entries(struct dentry *parent) in ncp_invalidate_dircache_entries()
408 struct dentry *dentry; in ncp_invalidate_dircache_entries() local
411 list_for_each_entry(dentry, &parent->d_subdirs, d_child) { in ncp_invalidate_dircache_entries()
412 dentry->d_fsdata = NULL; in ncp_invalidate_dircache_entries()
413 ncp_age_dentry(server, dentry); in ncp_invalidate_dircache_entries()
420 struct dentry *dentry = file->f_path.dentry; in ncp_readdir() local
421 struct inode *inode = d_inode(dentry); in ncp_readdir()
457 mtime = ncp_obtain_mtime(dentry); in ncp_readdir()
480 struct dentry *dent; in ncp_readdir()
483 spin_lock(&dentry->d_lock); in ncp_readdir()
485 spin_unlock(&dentry->d_lock); in ncp_readdir()
488 dent = ctl.cache->dentry[ctl.idx]; in ncp_readdir()
490 spin_unlock(&dentry->d_lock); in ncp_readdir()
493 spin_unlock(&dentry->d_lock); in ncp_readdir()
528 ncp_invalidate_dircache_entries(dentry); in ncp_readdir()
530 mtime = ncp_obtain_mtime(dentry); in ncp_readdir()
542 spin_lock(&dentry->d_lock); in ncp_readdir()
544 spin_unlock(&dentry->d_lock); in ncp_readdir()
570 static void ncp_d_prune(struct dentry *dentry) in ncp_d_prune() argument
572 if (!dentry->d_fsdata) /* not referenced from page cache */ in ncp_d_prune()
574 NCP_FINFO(d_inode(dentry->d_parent))->flags &= ~NCPI_DIR_CACHE; in ncp_d_prune()
582 struct dentry *newdent, *dentry = file->f_path.dentry; in ncp_fill_cache() local
583 struct inode *dir = d_inode(dentry); in ncp_fill_cache()
599 newdent = d_hash_and_lookup(dentry, &qname); in ncp_fill_cache()
603 newdent = d_alloc(dentry, &qname); in ncp_fill_cache()
635 spin_lock(&dentry->d_lock); in ncp_fill_cache()
637 spin_unlock(&dentry->d_lock); in ncp_fill_cache()
664 ctl.cache->dentry[ctl.idx] = newdent; in ncp_fill_cache()
792 struct dentry* dent; in ncp_conn_logged_in()
830 static struct dentry *ncp_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in ncp_lookup() argument
842 ncp_vdbg("server lookup for %pd2\n", dentry); in ncp_lookup()
846 res = ncp_io2vol(server, __name, &len, dentry->d_name.name, in ncp_lookup()
847 dentry->d_name.len, 1); in ncp_lookup()
853 res = ncp_io2vol(server, __name, &len, dentry->d_name.name, in ncp_lookup()
854 dentry->d_name.len, !ncp_preserve_case(dir)); in ncp_lookup()
858 ncp_vdbg("looked for %pd2, res=%d\n", dentry, res); in ncp_lookup()
875 ncp_new_dentry(dentry); in ncp_lookup()
877 d_add(dentry, inode); in ncp_lookup()
889 static int ncp_instantiate(struct inode *dir, struct dentry *dentry, in ncp_instantiate() argument
899 d_instantiate(dentry,inode); in ncp_instantiate()
905 ncp_vdbg("%pd2 failed, closing file\n", dentry); in ncp_instantiate()
910 int ncp_create_new(struct inode *dir, struct dentry *dentry, umode_t mode, in ncp_create_new() argument
919 ncp_vdbg("creating %pd2, mode=%hx\n", dentry, mode); in ncp_create_new()
921 ncp_age_dentry(server, dentry); in ncp_create_new()
923 error = ncp_io2vol(server, __name, &len, dentry->d_name.name, in ncp_create_new()
924 dentry->d_name.len, !ncp_preserve_case(dir)); in ncp_create_new()
948 ncp_dbg(1, "%pd2 failed\n", dentry); in ncp_create_new()
963 error = ncp_instantiate(dir, dentry, &finfo); in ncp_create_new()
968 static int ncp_create(struct inode *dir, struct dentry *dentry, umode_t mode, in ncp_create() argument
971 return ncp_create_new(dir, dentry, mode, 0, 0); in ncp_create()
974 static int ncp_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in ncp_mkdir() argument
981 ncp_dbg(1, "making %pd2\n", dentry); in ncp_mkdir()
983 ncp_age_dentry(server, dentry); in ncp_mkdir()
985 error = ncp_io2vol(server, __name, &len, dentry->d_name.name, in ncp_mkdir()
986 dentry->d_name.len, !ncp_preserve_case(dir)); in ncp_mkdir()
1004 error = ncp_instantiate(dir, dentry, &finfo); in ncp_mkdir()
1012 static int ncp_rmdir(struct inode *dir, struct dentry *dentry) in ncp_rmdir() argument
1018 ncp_dbg(1, "removing %pd2\n", dentry); in ncp_rmdir()
1021 error = ncp_io2vol(server, __name, &len, dentry->d_name.name, in ncp_rmdir()
1022 dentry->d_name.len, !ncp_preserve_case(dir)); in ncp_rmdir()
1056 static int ncp_unlink(struct inode *dir, struct dentry *dentry) in ncp_unlink() argument
1058 struct inode *inode = d_inode(dentry); in ncp_unlink()
1063 ncp_dbg(1, "unlinking %pd2\n", dentry); in ncp_unlink()
1073 error = ncp_del_file_or_subdir2(server, dentry); in ncp_unlink()
1078 error = ncp_force_unlink(dir, dentry); in ncp_unlink()
1083 ncp_dbg(1, "removed %pd2\n", dentry); in ncp_unlink()
1108 static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry, in ncp_rename()
1109 struct inode *new_dir, struct dentry *new_dentry) in ncp_rename()
1165 static int ncp_mknod(struct inode * dir, struct dentry *dentry, in ncp_mknod() argument
1170 return ncp_create_new(dir, dentry, mode, rdev, 0); in ncp_mknod()