Lines Matching refs:entry
28 static inline void __fuse_dentry_settime(struct dentry *entry, u64 time) in __fuse_dentry_settime() argument
30 entry->d_fsdata = (void *) time; in __fuse_dentry_settime()
33 static inline u64 fuse_dentry_time(const struct dentry *entry) in fuse_dentry_time() argument
35 return (u64)entry->d_fsdata; in fuse_dentry_time()
49 static inline u64 fuse_dentry_time(const struct dentry *entry) in fuse_dentry_time() argument
51 return ((union fuse_dentry *) entry->d_fsdata)->time; in fuse_dentry_time()
102 void fuse_change_entry_timeout(struct dentry *entry, struct fuse_entry_out *o) in fuse_change_entry_timeout() argument
104 fuse_dentry_settime(entry, in fuse_change_entry_timeout()
156 void fuse_invalidate_entry_cache(struct dentry *entry) in fuse_invalidate_entry_cache() argument
158 fuse_dentry_settime(entry, 0); in fuse_invalidate_entry_cache()
165 static void fuse_invalidate_entry(struct dentry *entry) in fuse_invalidate_entry() argument
167 d_invalidate(entry); in fuse_invalidate_entry()
168 fuse_invalidate_entry_cache(entry); in fuse_invalidate_entry()
195 static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags) in fuse_dentry_revalidate() argument
203 inode = d_inode_rcu(entry); in fuse_dentry_revalidate()
206 else if (time_before64(fuse_dentry_time(entry), get_jiffies_64()) || in fuse_dentry_revalidate()
230 parent = dget_parent(entry); in fuse_dentry_revalidate()
232 &entry->d_name, &outarg); in fuse_dentry_revalidate()
259 fuse_change_entry_timeout(entry, &outarg); in fuse_dentry_revalidate()
266 parent = dget_parent(entry); in fuse_dentry_revalidate()
379 static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry, in fuse_lookup() argument
390 err = fuse_lookup_name(dir->i_sb, get_node_id(dir), &entry->d_name, in fuse_lookup()
404 newent = d_splice_alias(inode, entry); in fuse_lookup()
409 entry = newent ? newent : entry; in fuse_lookup()
411 fuse_change_entry_timeout(entry, &outarg); in fuse_lookup()
413 fuse_invalidate_entry_cache(entry); in fuse_lookup()
431 static int fuse_create_open(struct inode *dir, struct dentry *entry, in fuse_create_open() argument
473 args.in_args[1].size = entry->d_name.len + 1; in fuse_create_open()
474 args.in_args[1].value = entry->d_name.name; in fuse_create_open()
502 d_instantiate(entry, inode); in fuse_create_open()
503 fuse_change_entry_timeout(entry, &outentry); in fuse_create_open()
505 err = finish_open(file, entry, generic_file_open); in fuse_create_open()
524 static int fuse_atomic_open(struct inode *dir, struct dentry *entry, in fuse_atomic_open() argument
532 if (d_in_lookup(entry)) { in fuse_atomic_open()
533 res = fuse_lookup(dir, entry, 0); in fuse_atomic_open()
538 entry = res; in fuse_atomic_open()
541 if (!(flags & O_CREAT) || d_really_is_positive(entry)) in fuse_atomic_open()
550 err = fuse_create_open(dir, entry, file, flags, mode); in fuse_atomic_open()
560 err = fuse_mknod(dir, entry, mode, 0); in fuse_atomic_open()
571 struct inode *dir, struct dentry *entry, in create_new_entry() argument
608 d_drop(entry); in create_new_entry()
609 d = d_splice_alias(inode, entry); in create_new_entry()
617 fuse_change_entry_timeout(entry, &outarg); in create_new_entry()
627 static int fuse_mknod(struct inode *dir, struct dentry *entry, umode_t mode, in fuse_mknod() argument
645 args.in_args[1].size = entry->d_name.len + 1; in fuse_mknod()
646 args.in_args[1].value = entry->d_name.name; in fuse_mknod()
647 return create_new_entry(fc, &args, dir, entry, mode); in fuse_mknod()
650 static int fuse_create(struct inode *dir, struct dentry *entry, umode_t mode, in fuse_create() argument
653 return fuse_mknod(dir, entry, mode, 0); in fuse_create()
656 static int fuse_mkdir(struct inode *dir, struct dentry *entry, umode_t mode) in fuse_mkdir() argument
672 args.in_args[1].size = entry->d_name.len + 1; in fuse_mkdir()
673 args.in_args[1].value = entry->d_name.name; in fuse_mkdir()
674 return create_new_entry(fc, &args, dir, entry, S_IFDIR); in fuse_mkdir()
677 static int fuse_symlink(struct inode *dir, struct dentry *entry, in fuse_symlink() argument
686 args.in_args[0].size = entry->d_name.len + 1; in fuse_symlink()
687 args.in_args[0].value = entry->d_name.name; in fuse_symlink()
690 return create_new_entry(fc, &args, dir, entry, S_IFLNK); in fuse_symlink()
701 static int fuse_unlink(struct inode *dir, struct dentry *entry) in fuse_unlink() argument
710 args.in_args[0].size = entry->d_name.len + 1; in fuse_unlink()
711 args.in_args[0].value = entry->d_name.name; in fuse_unlink()
714 struct inode *inode = d_inode(entry); in fuse_unlink()
730 fuse_invalidate_entry_cache(entry); in fuse_unlink()
733 fuse_invalidate_entry(entry); in fuse_unlink()
737 static int fuse_rmdir(struct inode *dir, struct dentry *entry) in fuse_rmdir() argument
746 args.in_args[0].size = entry->d_name.len + 1; in fuse_rmdir()
747 args.in_args[0].value = entry->d_name.name; in fuse_rmdir()
750 clear_nlink(d_inode(entry)); in fuse_rmdir()
752 fuse_invalidate_entry_cache(entry); in fuse_rmdir()
754 fuse_invalidate_entry(entry); in fuse_rmdir()
844 static int fuse_link(struct dentry *entry, struct inode *newdir, in fuse_link() argument
849 struct inode *inode = d_inode(entry); in fuse_link()
1011 struct dentry *entry; in fuse_reverse_inval_entry() local
1027 entry = d_lookup(dir, name); in fuse_reverse_inval_entry()
1029 if (!entry) in fuse_reverse_inval_entry()
1033 fuse_invalidate_entry(entry); in fuse_reverse_inval_entry()
1035 if (child_nodeid != 0 && d_really_is_positive(entry)) { in fuse_reverse_inval_entry()
1036 inode_lock(d_inode(entry)); in fuse_reverse_inval_entry()
1037 if (get_node_id(d_inode(entry)) != child_nodeid) { in fuse_reverse_inval_entry()
1041 if (d_mountpoint(entry)) { in fuse_reverse_inval_entry()
1045 if (d_is_dir(entry)) { in fuse_reverse_inval_entry()
1046 shrink_dcache_parent(entry); in fuse_reverse_inval_entry()
1047 if (!simple_empty(entry)) { in fuse_reverse_inval_entry()
1051 d_inode(entry)->i_flags |= S_DEAD; in fuse_reverse_inval_entry()
1053 dont_mount(entry); in fuse_reverse_inval_entry()
1054 clear_nlink(d_inode(entry)); in fuse_reverse_inval_entry()
1057 inode_unlock(d_inode(entry)); in fuse_reverse_inval_entry()
1059 d_delete(entry); in fuse_reverse_inval_entry()
1063 dput(entry); in fuse_reverse_inval_entry()
1627 static int fuse_setattr(struct dentry *entry, struct iattr *attr) in fuse_setattr() argument
1629 struct inode *inode = d_inode(entry); in fuse_setattr()
1670 ret = fuse_do_setattr(entry, attr, file); in fuse_setattr()
1680 if (d_is_dir(entry) && (attr->ia_valid & ATTR_MODE)) in fuse_setattr()
1681 fuse_invalidate_entry_cache(entry); in fuse_setattr()