Merge branch 'old.dcache' into work.dcache
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 4 Apr 2018 04:40:19 +0000 (00:40 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 4 Apr 2018 04:40:19 +0000 (00:40 -0400)
1  2 
include/linux/dcache.h

diff --combined include/linux/dcache.h
@@@ -1,4 -1,3 +1,4 @@@
 +/* SPDX-License-Identifier: GPL-2.0 */
  #ifndef __LINUX_DCACHE_H
  #define __LINUX_DCACHE_H
  
@@@ -56,7 -55,9 +56,7 @@@ struct qstr 
  
  #define QSTR_INIT(n,l) { { { .len = l } }, .name = n }
  
 -extern const char empty_string[];
  extern const struct qstr empty_name;
 -extern const char slash_string[];
  extern const struct qstr slash_name;
  
  struct dentry_stat_t {
@@@ -225,7 -226,6 +225,7 @@@ extern seqlock_t rename_lock
   */
  extern void d_instantiate(struct dentry *, struct inode *);
  extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
 +extern struct dentry * d_instantiate_anon(struct dentry *, struct inode *);
  extern int d_instantiate_no_diralias(struct dentry *, struct inode *);
  extern void __d_drop(struct dentry *dentry);
  extern void d_drop(struct dentry *dentry);
@@@ -234,7 -234,6 +234,7 @@@ extern void d_set_d_op(struct dentry *d
  
  /* allocate/de-allocate */
  extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
 +extern struct dentry * d_alloc_anon(struct super_block *);
  extern struct dentry * d_alloc_pseudo(struct super_block *, const struct qstr *);
  extern struct dentry * d_alloc_parallel(struct dentry *, const struct qstr *,
                                        wait_queue_head_t *);
@@@ -359,7 -358,7 +359,7 @@@ static inline void dont_mount(struct de
  
  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 -486,7 +487,7 @@@ static inline bool d_really_is_positive
        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);
  }
@@@ -520,7 -519,7 +520,7 @@@ static inline struct inode *d_inode(con
  }
  
  /**
 - * d_inode_rcu - Get the actual inode of this dentry with ACCESS_ONCE()
 + * d_inode_rcu - Get the actual inode of this dentry with READ_ONCE()
   * @dentry: The dentry to query
   *
   * This is the helper normal filesystems should use to get at their own inodes
   */
  static inline struct inode *d_inode_rcu(const struct dentry *dentry)
  {
 -      return ACCESS_ONCE(dentry->d_inode);
 +      return READ_ONCE(dentry->d_inode);
  }
  
  /**