summaryrefslogtreecommitdiffstats
path: root/include/linux/dcache.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-09-05 12:11:29 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-09-05 16:23:55 -0400
commitf0d3b3ded999daae1cf451d051018038c0a05bae (patch)
tree099364e3b72fbb79536454cb05bbb44293e8638c /include/linux/dcache.h
parent46ea1562da792a94ee8391f7aed882eb7771e18c (diff)
constify dcache.c inlined helpers where possible
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r--include/linux/dcache.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index c6d3fe50ff96..fe50f3db3af9 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -212,7 +212,7 @@ struct dentry_operations {
212 212
213extern seqlock_t rename_lock; 213extern seqlock_t rename_lock;
214 214
215static inline int dname_external(struct dentry *dentry) 215static inline int dname_external(const struct dentry *dentry)
216{ 216{
217 return dentry->d_name.name != dentry->d_iname; 217 return dentry->d_name.name != dentry->d_iname;
218} 218}
@@ -358,17 +358,17 @@ extern struct dentry *dget_parent(struct dentry *dentry);
358 * Returns true if the dentry passed is not currently hashed. 358 * Returns true if the dentry passed is not currently hashed.
359 */ 359 */
360 360
361static inline int d_unhashed(struct dentry *dentry) 361static inline int d_unhashed(const struct dentry *dentry)
362{ 362{
363 return hlist_bl_unhashed(&dentry->d_hash); 363 return hlist_bl_unhashed(&dentry->d_hash);
364} 364}
365 365
366static inline int d_unlinked(struct dentry *dentry) 366static inline int d_unlinked(const struct dentry *dentry)
367{ 367{
368 return d_unhashed(dentry) && !IS_ROOT(dentry); 368 return d_unhashed(dentry) && !IS_ROOT(dentry);
369} 369}
370 370
371static inline int cant_mount(struct dentry *dentry) 371static inline int cant_mount(const struct dentry *dentry)
372{ 372{
373 return (dentry->d_flags & DCACHE_CANT_MOUNT); 373 return (dentry->d_flags & DCACHE_CANT_MOUNT);
374} 374}
@@ -382,12 +382,12 @@ static inline void dont_mount(struct dentry *dentry)
382 382
383extern void dput(struct dentry *); 383extern void dput(struct dentry *);
384 384
385static inline bool d_managed(struct dentry *dentry) 385static inline bool d_managed(const struct dentry *dentry)
386{ 386{
387 return dentry->d_flags & DCACHE_MANAGED_DENTRY; 387 return dentry->d_flags & DCACHE_MANAGED_DENTRY;
388} 388}
389 389
390static inline bool d_mountpoint(struct dentry *dentry) 390static inline bool d_mountpoint(const struct dentry *dentry)
391{ 391{
392 return dentry->d_flags & DCACHE_MOUNTED; 392 return dentry->d_flags & DCACHE_MOUNTED;
393} 393}