Lines Matching refs:dentry
3 * fs/hmdfs/dentry.c
18 void hmdfs_set_time(struct dentry *dentry, unsigned long time)
20 struct hmdfs_dentry_info *d_info = dentry->d_fsdata;
26 unsigned long hmdfs_get_time(struct dentry *dentry)
28 struct hmdfs_dentry_info *d_info = dentry->d_fsdata;
36 struct dentry *target,
37 struct dentry *parent)
55 static inline void lock_for_dname_cmp(struct dentry *dentry,
56 struct dentry *lower_dentry)
58 if (dentry < lower_dentry) {
59 spin_lock(&dentry->d_lock);
63 spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
67 static inline void unlock_for_dname_cmp(struct dentry *dentry,
68 struct dentry *lower_dentry)
70 spin_unlock(&dentry->d_lock);
74 static int hmdfs_dev_d_revalidate(struct dentry *direntry, unsigned int flags)
101 static int hmdfs_d_revalidate(struct dentry *direntry, unsigned int flags)
106 struct dentry *parent_dentry = NULL;
107 struct dentry *parent_lower_dentry = NULL;
108 struct dentry *lower_cur_parent_dentry = NULL;
109 struct dentry *lower_dentry = NULL;
122 /* remote dentry timeout */
133 lower_dentry = lower_path.dentry;
136 parent_lower_dentry = parent_lower_path.dentry;
170 static void hmdfs_dev_d_release(struct dentry *dentry)
173 if (!dentry || !dentry->d_fsdata)
176 switch (hmdfs_d(dentry)->dentry_type) {
178 hmdfs_clear_cache_dents(dentry, false);
179 hmdfs_drop_remote_cache_dents(dentry);
180 path_put(&(hmdfs_d(dentry)->lower_path));
183 hmdfs_put_reset_lower_path(dentry);
188 hmdfs_clear_cache_dents(dentry, false);
191 item = hmdfs_find_cache_item(CLOUD_DEVICE, dentry);
199 hmdfs_clear_cache_dents(dentry, false);
202 hmdfs_err("Unexpected dentry type %d",
203 hmdfs_d(dentry)->dentry_type);
207 kmem_cache_free(hmdfs_dentry_cachep, dentry->d_fsdata);
208 dentry->d_fsdata = NULL;
211 static void hmdfs_d_release(struct dentry *dentry)
213 if (!dentry || !dentry->d_fsdata)
216 hmdfs_clear_cache_dents(dentry, false);
217 hmdfs_drop_remote_cache_dents(dentry);
218 hmdfs_put_reset_lower_path(dentry);
219 kmem_cache_free(hmdfs_dentry_cachep, dentry->d_fsdata);
220 dentry->d_fsdata = NULL;
223 static int hmdfs_cmp_ci(const struct dentry *dentry, unsigned int len,
226 struct hmdfs_sb_info *sbi = hmdfs_sb(dentry->d_sb);
241 static int hmdfs_hash_ci(const struct dentry *dentry, struct qstr *qstr)
246 struct hmdfs_sb_info *sbi = hmdfs_sb(dentry->d_sb);
251 hash = init_name_hash(dentry);
270 void clear_comrades(struct dentry *dentry)
272 struct hmdfs_dentry_info_merge *cdi = hmdfs_dm(dentry);
281 * d_revalidate_merge - revalidate a merge dentry
283 * Always return 0 to invalidate a dentry for fault-tolerance.
286 static int d_revalidate_merge(struct dentry *direntry, unsigned int flags)
290 struct dentry *parent_dentry = NULL;
291 struct dentry *lower_cur_parent_dentry = NULL;
332 static void d_release_merge(struct dentry *dentry)
334 if (!dentry || !dentry->d_fsdata)
337 clear_comrades(dentry);
338 kmem_cache_free(hmdfs_dentry_merge_cachep, dentry->d_fsdata);
339 dentry->d_fsdata = NULL;