Skip to content

Commit f0d3b3d

Browse files
author
Al Viro
committed
constify dcache.c inlined helpers where possible
Signed-off-by: Al Viro <[email protected]>
1 parent 46ea156 commit f0d3b3d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/linux/dcache.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ struct dentry_operations {
212212

213213
extern seqlock_t rename_lock;
214214

215-
static inline int dname_external(struct dentry *dentry)
215+
static inline int dname_external(const struct dentry *dentry)
216216
{
217217
return dentry->d_name.name != dentry->d_iname;
218218
}
@@ -358,17 +358,17 @@ extern struct dentry *dget_parent(struct dentry *dentry);
358358
* Returns true if the dentry passed is not currently hashed.
359359
*/
360360

361-
static inline int d_unhashed(struct dentry *dentry)
361+
static inline int d_unhashed(const struct dentry *dentry)
362362
{
363363
return hlist_bl_unhashed(&dentry->d_hash);
364364
}
365365

366-
static inline int d_unlinked(struct dentry *dentry)
366+
static inline int d_unlinked(const struct dentry *dentry)
367367
{
368368
return d_unhashed(dentry) && !IS_ROOT(dentry);
369369
}
370370

371-
static inline int cant_mount(struct dentry *dentry)
371+
static inline int cant_mount(const struct dentry *dentry)
372372
{
373373
return (dentry->d_flags & DCACHE_CANT_MOUNT);
374374
}
@@ -382,12 +382,12 @@ static inline void dont_mount(struct dentry *dentry)
382382

383383
extern void dput(struct dentry *);
384384

385-
static inline bool d_managed(struct dentry *dentry)
385+
static inline bool d_managed(const struct dentry *dentry)
386386
{
387387
return dentry->d_flags & DCACHE_MANAGED_DENTRY;
388388
}
389389

390-
static inline bool d_mountpoint(struct dentry *dentry)
390+
static inline bool d_mountpoint(const struct dentry *dentry)
391391
{
392392
return dentry->d_flags & DCACHE_MOUNTED;
393393
}

0 commit comments

Comments
 (0)