• Home
  • Raw
  • Download

Lines Matching refs:dentry

42 void ocfs2_dentry_attach_gen(struct dentry *dentry)  in ocfs2_dentry_attach_gen()  argument
45 OCFS2_I(d_inode(dentry->d_parent))->ip_dir_lock_gen; in ocfs2_dentry_attach_gen()
46 BUG_ON(d_inode(dentry)); in ocfs2_dentry_attach_gen()
47 dentry->d_fsdata = (void *)gen; in ocfs2_dentry_attach_gen()
51 static int ocfs2_dentry_revalidate(struct dentry *dentry, unsigned int flags) in ocfs2_dentry_revalidate() argument
60 inode = d_inode(dentry); in ocfs2_dentry_revalidate()
61 osb = OCFS2_SB(dentry->d_sb); in ocfs2_dentry_revalidate()
63 trace_ocfs2_dentry_revalidate(dentry, dentry->d_name.len, in ocfs2_dentry_revalidate()
64 dentry->d_name.name); in ocfs2_dentry_revalidate()
71 unsigned long gen = (unsigned long) dentry->d_fsdata; in ocfs2_dentry_revalidate()
73 spin_lock(&dentry->d_lock); in ocfs2_dentry_revalidate()
74 pgen = OCFS2_I(d_inode(dentry->d_parent))->ip_dir_lock_gen; in ocfs2_dentry_revalidate()
75 spin_unlock(&dentry->d_lock); in ocfs2_dentry_revalidate()
76 trace_ocfs2_dentry_revalidate_negative(dentry->d_name.len, in ocfs2_dentry_revalidate()
77 dentry->d_name.name, in ocfs2_dentry_revalidate()
114 if (!dentry->d_fsdata) { in ocfs2_dentry_revalidate()
128 static int ocfs2_match_dentry(struct dentry *dentry, in ocfs2_match_dentry() argument
140 if (!dentry->d_fsdata) in ocfs2_match_dentry()
143 if (!dentry->d_parent) in ocfs2_match_dentry()
146 if (skip_unhashed && d_unhashed(dentry)) in ocfs2_match_dentry()
149 parent = d_inode(dentry->d_parent); in ocfs2_match_dentry()
168 struct dentry *ocfs2_find_local_alias(struct inode *inode, in ocfs2_find_local_alias()
172 struct dentry *dentry; in ocfs2_find_local_alias() local
175 hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { in ocfs2_find_local_alias()
176 spin_lock(&dentry->d_lock); in ocfs2_find_local_alias()
177 if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) { in ocfs2_find_local_alias()
178 trace_ocfs2_find_local_alias(dentry->d_name.len, in ocfs2_find_local_alias()
179 dentry->d_name.name); in ocfs2_find_local_alias()
181 dget_dlock(dentry); in ocfs2_find_local_alias()
182 spin_unlock(&dentry->d_lock); in ocfs2_find_local_alias()
184 return dentry; in ocfs2_find_local_alias()
186 spin_unlock(&dentry->d_lock); in ocfs2_find_local_alias()
226 int ocfs2_dentry_attach_lock(struct dentry *dentry, in ocfs2_dentry_attach_lock() argument
231 struct dentry *alias; in ocfs2_dentry_attach_lock()
232 struct ocfs2_dentry_lock *dl = dentry->d_fsdata; in ocfs2_dentry_attach_lock()
234 trace_ocfs2_dentry_attach_lock(dentry->d_name.len, dentry->d_name.name, in ocfs2_dentry_attach_lock()
246 if (d_really_is_negative(dentry) && dentry->d_fsdata) { in ocfs2_dentry_attach_lock()
249 dentry->d_fsdata = dl = NULL; in ocfs2_dentry_attach_lock()
255 dentry, in ocfs2_dentry_attach_lock()
281 dentry, in ocfs2_dentry_attach_lock()
313 if (unlikely(dentry->d_fsdata && !alias)) { in ocfs2_dentry_attach_lock()
325 dentry->d_fsdata = dl; in ocfs2_dentry_attach_lock()
334 ret = ocfs2_dentry_lock(dentry, 0); in ocfs2_dentry_attach_lock()
336 ocfs2_dentry_unlock(dentry, 0); in ocfs2_dentry_attach_lock()
349 dentry->d_fsdata = NULL; in ocfs2_dentry_attach_lock()
406 static void ocfs2_dentry_iput(struct dentry *dentry, struct inode *inode) in ocfs2_dentry_iput() argument
408 struct ocfs2_dentry_lock *dl = dentry->d_fsdata; in ocfs2_dentry_iput()
415 if (!(dentry->d_flags & DCACHE_DISCONNECTED) && in ocfs2_dentry_iput()
416 !d_unhashed(dentry)) { in ocfs2_dentry_iput()
422 ino, dentry->d_flags, dentry); in ocfs2_dentry_iput()
429 dentry, dl->dl_count); in ocfs2_dentry_iput()
431 ocfs2_dentry_lock_put(OCFS2_SB(dentry->d_sb), dl); in ocfs2_dentry_iput()
456 void ocfs2_dentry_move(struct dentry *dentry, struct dentry *target, in ocfs2_dentry_move() argument
461 struct inode *inode = d_inode(dentry); in ocfs2_dentry_move()
472 ocfs2_dentry_lock_put(osb, dentry->d_fsdata); in ocfs2_dentry_move()
474 dentry->d_fsdata = NULL; in ocfs2_dentry_move()
475 ret = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(new_dir)->ip_blkno); in ocfs2_dentry_move()
480 d_move(dentry, target); in ocfs2_dentry_move()