diff options
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index bd07758943e..f958c19e3ca 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -167,6 +167,8 @@ struct dentry_operations { void (*d_release)(struct dentry *); void (*d_iput)(struct dentry *, struct inode *); char *(*d_dname)(struct dentry *, char *, int); + struct vfsmount *(*d_automount)(struct path *); + int (*d_manage)(struct dentry *, bool, bool); } ____cacheline_aligned; /* @@ -205,13 +207,18 @@ struct dentry_operations { #define DCACHE_CANT_MOUNT 0x0100 #define DCACHE_GENOCIDE 0x0200 -#define DCACHE_MOUNTED 0x0400 /* is a mountpoint */ #define DCACHE_OP_HASH 0x1000 #define DCACHE_OP_COMPARE 0x2000 #define DCACHE_OP_REVALIDATE 0x4000 #define DCACHE_OP_DELETE 0x8000 +#define DCACHE_MOUNTED 0x10000 /* is a mountpoint */ +#define DCACHE_NEED_AUTOMOUNT 0x20000 /* handle automount on this dir */ +#define DCACHE_MANAGE_TRANSIT 0x40000 /* manage transit from this dirent */ +#define DCACHE_MANAGED_DENTRY \ + (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) + extern seqlock_t rename_lock; static inline int dname_external(struct dentry *dentry) @@ -307,7 +314,7 @@ extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, * __d_rcu_to_refcount - take a refcount on dentry if sequence check is ok * @dentry: dentry to take a ref on * @seq: seqcount to verify against - * @Returns: 0 on failure, else 1. + * Returns: 0 on failure, else 1. * * __d_rcu_to_refcount operates on a dentry,seq pair that was returned * by __d_lookup_rcu, to get a reference on an rcu-walk dentry. @@ -399,7 +406,12 @@ static inline void dont_mount(struct dentry *dentry) extern void dput(struct dentry *); -static inline int d_mountpoint(struct dentry *dentry) +static inline bool d_managed(struct dentry *dentry) +{ + return dentry->d_flags & DCACHE_MANAGED_DENTRY; +} + +static inline bool d_mountpoint(struct dentry *dentry) { return dentry->d_flags & DCACHE_MOUNTED; } |