Loading fs/overlayfs/inode.c +4 −0 Original line number Diff line number Diff line Loading @@ -490,6 +490,10 @@ struct inode *ovl_get_inode(struct dentry *dentry, struct dentry *upperdentry) } ovl_fill_inode(inode, realinode->i_mode, realinode->i_rdev); ovl_inode_init(inode, upperdentry, lowerdentry); if (upperdentry && ovl_is_impuredir(upperdentry)) ovl_set_flag(OVL_IMPURE, inode); if (inode->i_state & I_NEW) unlock_new_inode(inode); out: Loading fs/overlayfs/namei.c +0 −4 Original line number Diff line number Diff line Loading @@ -341,7 +341,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, unsigned int ctr = 0; struct inode *inode = NULL; bool upperopaque = false; bool upperimpure = false; char *upperredirect = NULL; struct dentry *this; unsigned int i; Loading Loading @@ -386,8 +385,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, poe = roe; } upperopaque = d.opaque; if (upperdentry && d.is_dir) upperimpure = ovl_is_impuredir(upperdentry); } if (!d.stop && poe->numlower) { Loading Loading @@ -434,7 +431,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, goto out_put; oe->opaque = upperopaque; oe->impure = upperimpure; memcpy(oe->lowerstack, stack, sizeof(struct path) * ctr); dentry->d_fsdata = oe; Loading fs/overlayfs/overlayfs.h +6 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,10 @@ enum ovl_path_type { #define OVL_XATTR_ORIGIN OVL_XATTR_PREFIX "origin" #define OVL_XATTR_IMPURE OVL_XATTR_PREFIX "impure" enum ovl_flag { OVL_IMPURE, }; /* * The tuple (fh,uuid) is a universal unique identifier for a copy up origin, * where: Loading Loading @@ -195,7 +199,6 @@ struct inode *ovl_inode_real(struct inode *inode); struct ovl_dir_cache *ovl_dir_cache(struct dentry *dentry); void ovl_set_dir_cache(struct dentry *dentry, struct ovl_dir_cache *cache); bool ovl_dentry_is_opaque(struct dentry *dentry); bool ovl_dentry_is_impure(struct dentry *dentry); bool ovl_dentry_is_whiteout(struct dentry *dentry); void ovl_dentry_set_opaque(struct dentry *dentry); bool ovl_redirect_dir(struct super_block *sb); Loading @@ -215,6 +218,8 @@ int ovl_check_setxattr(struct dentry *dentry, struct dentry *upperdentry, const char *name, const void *value, size_t size, int xerr); int ovl_set_impure(struct dentry *dentry, struct dentry *upperdentry); void ovl_set_flag(unsigned long flag, struct inode *inode); bool ovl_test_flag(unsigned long flag, struct inode *inode); static inline bool ovl_is_impuredir(struct dentry *dentry) { Loading fs/overlayfs/ovl_entry.h +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ struct ovl_entry { struct { u64 version; bool opaque; bool impure; bool copying; }; struct rcu_head rcu; Loading @@ -54,6 +53,7 @@ struct ovl_entry *ovl_alloc_entry(unsigned int numlower); struct ovl_inode { const char *redirect; unsigned long flags; struct inode vfs_inode; struct dentry *__upperdentry; struct inode *lower; Loading fs/overlayfs/super.c +3 −1 Original line number Diff line number Diff line Loading @@ -170,6 +170,7 @@ static struct inode *ovl_alloc_inode(struct super_block *sb) struct ovl_inode *oi = kmem_cache_alloc(ovl_inode_cachep, GFP_KERNEL); oi->redirect = NULL; oi->flags = 0; oi->__upperdentry = NULL; oi->lower = NULL; Loading Loading @@ -1004,7 +1005,8 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) kfree(lowertmp); if (upperpath.dentry) { oe->impure = ovl_is_impuredir(upperpath.dentry); if (ovl_is_impuredir(upperpath.dentry)) ovl_set_flag(OVL_IMPURE, d_inode(root_dentry)); } for (i = 0; i < numlower; i++) { oe->lowerstack[i].dentry = stack[i].dentry; Loading Loading
fs/overlayfs/inode.c +4 −0 Original line number Diff line number Diff line Loading @@ -490,6 +490,10 @@ struct inode *ovl_get_inode(struct dentry *dentry, struct dentry *upperdentry) } ovl_fill_inode(inode, realinode->i_mode, realinode->i_rdev); ovl_inode_init(inode, upperdentry, lowerdentry); if (upperdentry && ovl_is_impuredir(upperdentry)) ovl_set_flag(OVL_IMPURE, inode); if (inode->i_state & I_NEW) unlock_new_inode(inode); out: Loading
fs/overlayfs/namei.c +0 −4 Original line number Diff line number Diff line Loading @@ -341,7 +341,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, unsigned int ctr = 0; struct inode *inode = NULL; bool upperopaque = false; bool upperimpure = false; char *upperredirect = NULL; struct dentry *this; unsigned int i; Loading Loading @@ -386,8 +385,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, poe = roe; } upperopaque = d.opaque; if (upperdentry && d.is_dir) upperimpure = ovl_is_impuredir(upperdentry); } if (!d.stop && poe->numlower) { Loading Loading @@ -434,7 +431,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, goto out_put; oe->opaque = upperopaque; oe->impure = upperimpure; memcpy(oe->lowerstack, stack, sizeof(struct path) * ctr); dentry->d_fsdata = oe; Loading
fs/overlayfs/overlayfs.h +6 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,10 @@ enum ovl_path_type { #define OVL_XATTR_ORIGIN OVL_XATTR_PREFIX "origin" #define OVL_XATTR_IMPURE OVL_XATTR_PREFIX "impure" enum ovl_flag { OVL_IMPURE, }; /* * The tuple (fh,uuid) is a universal unique identifier for a copy up origin, * where: Loading Loading @@ -195,7 +199,6 @@ struct inode *ovl_inode_real(struct inode *inode); struct ovl_dir_cache *ovl_dir_cache(struct dentry *dentry); void ovl_set_dir_cache(struct dentry *dentry, struct ovl_dir_cache *cache); bool ovl_dentry_is_opaque(struct dentry *dentry); bool ovl_dentry_is_impure(struct dentry *dentry); bool ovl_dentry_is_whiteout(struct dentry *dentry); void ovl_dentry_set_opaque(struct dentry *dentry); bool ovl_redirect_dir(struct super_block *sb); Loading @@ -215,6 +218,8 @@ int ovl_check_setxattr(struct dentry *dentry, struct dentry *upperdentry, const char *name, const void *value, size_t size, int xerr); int ovl_set_impure(struct dentry *dentry, struct dentry *upperdentry); void ovl_set_flag(unsigned long flag, struct inode *inode); bool ovl_test_flag(unsigned long flag, struct inode *inode); static inline bool ovl_is_impuredir(struct dentry *dentry) { Loading
fs/overlayfs/ovl_entry.h +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ struct ovl_entry { struct { u64 version; bool opaque; bool impure; bool copying; }; struct rcu_head rcu; Loading @@ -54,6 +53,7 @@ struct ovl_entry *ovl_alloc_entry(unsigned int numlower); struct ovl_inode { const char *redirect; unsigned long flags; struct inode vfs_inode; struct dentry *__upperdentry; struct inode *lower; Loading
fs/overlayfs/super.c +3 −1 Original line number Diff line number Diff line Loading @@ -170,6 +170,7 @@ static struct inode *ovl_alloc_inode(struct super_block *sb) struct ovl_inode *oi = kmem_cache_alloc(ovl_inode_cachep, GFP_KERNEL); oi->redirect = NULL; oi->flags = 0; oi->__upperdentry = NULL; oi->lower = NULL; Loading Loading @@ -1004,7 +1005,8 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) kfree(lowertmp); if (upperpath.dentry) { oe->impure = ovl_is_impuredir(upperpath.dentry); if (ovl_is_impuredir(upperpath.dentry)) ovl_set_flag(OVL_IMPURE, d_inode(root_dentry)); } for (i = 0; i < numlower; i++) { oe->lowerstack[i].dentry = stack[i].dentry; Loading