lkml.org 
[lkml]   [2017]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[VFS PATCH] constify more dcache.h inlined helpers.

Many of the inlines in dcache.h were changed to accept
const struct pointers in commit f0d3b3ded999 ("constify dcache.c
inlined helpers where possible").
This patch allows 'const' in a couple that were added since then.

Signed-off-by: NeilBrown <neilb@suse.com>
---
include/linux/dcache.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index aae1cdb76851..66ca42b1935b 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -358,7 +358,7 @@ static inline void dont_mount(struct dentry *dentry)

extern void __d_lookup_done(struct dentry *);

-static inline int d_in_lookup(struct dentry *dentry)
+static inline int d_in_lookup(const struct dentry *dentry)
{
return dentry->d_flags & DCACHE_PAR_LOOKUP;
}
@@ -486,7 +486,7 @@ static inline bool d_really_is_positive(const struct dentry *dentry)
return dentry->d_inode != NULL;
}

-static inline int simple_positive(struct dentry *dentry)
+static inline int simple_positive(const struct dentry *dentry)
{
return d_really_is_positive(dentry) && !d_unhashed(dentry);
}
--
2.14.0.rc0.dirty
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-08-02 05:25    [W:0.385 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site