Loading fs/overlayfs/ovl_entry.h +3 −5 Original line number Original line Diff line number Diff line Loading @@ -35,12 +35,8 @@ struct ovl_fs { /* private information held for every overlayfs dentry */ /* private information held for every overlayfs dentry */ struct ovl_entry { struct ovl_entry { struct ovl_dir_cache *cache; union { union { struct { u64 version; bool opaque; bool opaque; }; struct rcu_head rcu; struct rcu_head rcu; }; }; unsigned numlower; unsigned numlower; Loading @@ -50,7 +46,9 @@ struct ovl_entry { struct ovl_entry *ovl_alloc_entry(unsigned int numlower); struct ovl_entry *ovl_alloc_entry(unsigned int numlower); struct ovl_inode { struct ovl_inode { struct ovl_dir_cache *cache; const char *redirect; const char *redirect; u64 version; unsigned long flags; unsigned long flags; struct inode vfs_inode; struct inode vfs_inode; struct dentry *__upperdentry; struct dentry *__upperdentry; Loading fs/overlayfs/super.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -169,7 +169,9 @@ static struct inode *ovl_alloc_inode(struct super_block *sb) { { struct ovl_inode *oi = kmem_cache_alloc(ovl_inode_cachep, GFP_KERNEL); struct ovl_inode *oi = kmem_cache_alloc(ovl_inode_cachep, GFP_KERNEL); oi->cache = NULL; oi->redirect = NULL; oi->redirect = NULL; oi->version = 0; oi->flags = 0; oi->flags = 0; oi->__upperdentry = NULL; oi->__upperdentry = NULL; oi->lower = NULL; oi->lower = NULL; Loading fs/overlayfs/util.c +8 −12 Original line number Original line Diff line number Diff line Loading @@ -160,16 +160,12 @@ struct inode *ovl_inode_real(struct inode *inode) struct ovl_dir_cache *ovl_dir_cache(struct dentry *dentry) struct ovl_dir_cache *ovl_dir_cache(struct dentry *dentry) { { struct ovl_entry *oe = dentry->d_fsdata; return OVL_I(d_inode(dentry))->cache; return oe->cache; } } void ovl_set_dir_cache(struct dentry *dentry, struct ovl_dir_cache *cache) void ovl_set_dir_cache(struct dentry *dentry, struct ovl_dir_cache *cache) { { struct ovl_entry *oe = dentry->d_fsdata; OVL_I(d_inode(dentry))->cache = cache; oe->cache = cache; } } bool ovl_dentry_is_opaque(struct dentry *dentry) bool ovl_dentry_is_opaque(struct dentry *dentry) Loading Loading @@ -242,18 +238,18 @@ void ovl_inode_update(struct inode *inode, struct dentry *upperdentry) void ovl_dentry_version_inc(struct dentry *dentry) void ovl_dentry_version_inc(struct dentry *dentry) { { struct ovl_entry *oe = dentry->d_fsdata; struct inode *inode = d_inode(dentry); WARN_ON(!inode_is_locked(dentry->d_inode)); WARN_ON(!inode_is_locked(inode)); oe->version++; OVL_I(inode)->version++; } } u64 ovl_dentry_version_get(struct dentry *dentry) u64 ovl_dentry_version_get(struct dentry *dentry) { { struct ovl_entry *oe = dentry->d_fsdata; struct inode *inode = d_inode(dentry); WARN_ON(!inode_is_locked(dentry->d_inode)); WARN_ON(!inode_is_locked(inode)); return oe->version; return OVL_I(inode)->version; } } bool ovl_is_whiteout(struct dentry *dentry) bool ovl_is_whiteout(struct dentry *dentry) Loading Loading
fs/overlayfs/ovl_entry.h +3 −5 Original line number Original line Diff line number Diff line Loading @@ -35,12 +35,8 @@ struct ovl_fs { /* private information held for every overlayfs dentry */ /* private information held for every overlayfs dentry */ struct ovl_entry { struct ovl_entry { struct ovl_dir_cache *cache; union { union { struct { u64 version; bool opaque; bool opaque; }; struct rcu_head rcu; struct rcu_head rcu; }; }; unsigned numlower; unsigned numlower; Loading @@ -50,7 +46,9 @@ struct ovl_entry { struct ovl_entry *ovl_alloc_entry(unsigned int numlower); struct ovl_entry *ovl_alloc_entry(unsigned int numlower); struct ovl_inode { struct ovl_inode { struct ovl_dir_cache *cache; const char *redirect; const char *redirect; u64 version; unsigned long flags; unsigned long flags; struct inode vfs_inode; struct inode vfs_inode; struct dentry *__upperdentry; struct dentry *__upperdentry; Loading
fs/overlayfs/super.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -169,7 +169,9 @@ static struct inode *ovl_alloc_inode(struct super_block *sb) { { struct ovl_inode *oi = kmem_cache_alloc(ovl_inode_cachep, GFP_KERNEL); struct ovl_inode *oi = kmem_cache_alloc(ovl_inode_cachep, GFP_KERNEL); oi->cache = NULL; oi->redirect = NULL; oi->redirect = NULL; oi->version = 0; oi->flags = 0; oi->flags = 0; oi->__upperdentry = NULL; oi->__upperdentry = NULL; oi->lower = NULL; oi->lower = NULL; Loading
fs/overlayfs/util.c +8 −12 Original line number Original line Diff line number Diff line Loading @@ -160,16 +160,12 @@ struct inode *ovl_inode_real(struct inode *inode) struct ovl_dir_cache *ovl_dir_cache(struct dentry *dentry) struct ovl_dir_cache *ovl_dir_cache(struct dentry *dentry) { { struct ovl_entry *oe = dentry->d_fsdata; return OVL_I(d_inode(dentry))->cache; return oe->cache; } } void ovl_set_dir_cache(struct dentry *dentry, struct ovl_dir_cache *cache) void ovl_set_dir_cache(struct dentry *dentry, struct ovl_dir_cache *cache) { { struct ovl_entry *oe = dentry->d_fsdata; OVL_I(d_inode(dentry))->cache = cache; oe->cache = cache; } } bool ovl_dentry_is_opaque(struct dentry *dentry) bool ovl_dentry_is_opaque(struct dentry *dentry) Loading Loading @@ -242,18 +238,18 @@ void ovl_inode_update(struct inode *inode, struct dentry *upperdentry) void ovl_dentry_version_inc(struct dentry *dentry) void ovl_dentry_version_inc(struct dentry *dentry) { { struct ovl_entry *oe = dentry->d_fsdata; struct inode *inode = d_inode(dentry); WARN_ON(!inode_is_locked(dentry->d_inode)); WARN_ON(!inode_is_locked(inode)); oe->version++; OVL_I(inode)->version++; } } u64 ovl_dentry_version_get(struct dentry *dentry) u64 ovl_dentry_version_get(struct dentry *dentry) { { struct ovl_entry *oe = dentry->d_fsdata; struct inode *inode = d_inode(dentry); WARN_ON(!inode_is_locked(dentry->d_inode)); WARN_ON(!inode_is_locked(inode)); return oe->version; return OVL_I(inode)->version; } } bool ovl_is_whiteout(struct dentry *dentry) bool ovl_is_whiteout(struct dentry *dentry) Loading