Skip to contentSkip to conversation

constify more dcache.h inlined helpers.

PATCH/resend NeilBrown 1 participant 1 message Feb 2, 2018

lore
Share & tools
lore

NeilBrown

author
#0 lore raw

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.

---

Hi Al,
I still don't see this in your tree, despite you saying on Oct 20th that it had been applied. So I thought it might be a good time to resend.

Thanks,
NeilBrown

 include/linux/dcache.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/dcache.h +2 -2
index 65cd8ab60b7a..5b336f9faf01 100644
@@ -359,7 +359,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;
 }
@@ -487,7 +487,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);
 }
Signature · 1 line
2.14.0.rc0.dirty