Skip to content

Commit 077f0bc

Browse files
Al Viroelektroschmock
authored andcommitted
constify dcache.c inlined helpers where possible
Signed-off-by: Al Viro <[email protected]> Change-Id: I3daf2e9067ed87e074660b36d8404a21cc7f28fa
1 parent 58dc127 commit 077f0bc

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
@@ -215,7 +215,7 @@ struct dentry_operations {
215215

216216
extern seqlock_t rename_lock;
217217

218-
static inline int dname_external(struct dentry *dentry)
218+
static inline int dname_external(const struct dentry *dentry)
219219
{
220220
return dentry->d_name.name != dentry->d_iname;
221221
}
@@ -386,17 +386,17 @@ extern struct dentry *dget_parent(struct dentry *dentry);
386386
* Returns true if the dentry passed is not currently hashed.
387387
*/
388388

389-
static inline int d_unhashed(struct dentry *dentry)
389+
static inline int d_unhashed(const struct dentry *dentry)
390390
{
391391
return hlist_bl_unhashed(&dentry->d_hash);
392392
}
393393

394-
static inline int d_unlinked(struct dentry *dentry)
394+
static inline int d_unlinked(const struct dentry *dentry)
395395
{
396396
return d_unhashed(dentry) && !IS_ROOT(dentry);
397397
}
398398

399-
static inline int cant_mount(struct dentry *dentry)
399+
static inline int cant_mount(const struct dentry *dentry)
400400
{
401401
return (dentry->d_flags & DCACHE_CANT_MOUNT);
402402
}
@@ -410,12 +410,12 @@ static inline void dont_mount(struct dentry *dentry)
410410

411411
extern void dput(struct dentry *);
412412

413-
static inline bool d_managed(struct dentry *dentry)
413+
static inline bool d_managed(const struct dentry *dentry)
414414
{
415415
return dentry->d_flags & DCACHE_MANAGED_DENTRY;
416416
}
417417

418-
static inline bool d_mountpoint(struct dentry *dentry)
418+
static inline bool d_mountpoint(const struct dentry *dentry)
419419
{
420420
return dentry->d_flags & DCACHE_MOUNTED;
421421
}

0 commit comments

Comments
 (0)