ovl: detect overlapping layers
[sfrench/cifs-2.6.git] / fs / overlayfs / ovl_entry.h
index ec237035333afcbb8ffab21951a172e384a6597a..6ed1ace8f8b30092e9455de3ace45461d53a2eeb 100644 (file)
@@ -29,6 +29,8 @@ struct ovl_sb {
 
 struct ovl_layer {
        struct vfsmount *mnt;
+       /* Trap in ovl inode cache */
+       struct inode *trap;
        struct ovl_sb *fs;
        /* Index of this layer in fs root (upper idx == 0) */
        int idx;
@@ -65,6 +67,10 @@ struct ovl_fs {
        /* Did we take the inuse lock? */
        bool upperdir_locked;
        bool workdir_locked;
+       /* Traps in ovl inode cache */
+       struct inode *upperdir_trap;
+       struct inode *workdir_trap;
+       struct inode *indexdir_trap;
        /* Inode numbers in all layers do not use the high xino_bits */
        unsigned int xino_bits;
 };