diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-12-16 11:02:57 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-12-16 11:02:57 +0100 |
commit | 5cf5b477f0ca33f56a30c7ec00e61a6204da2efb (patch) | |
tree | e418f95e7847541a12dc96411d6929f89849ce53 /fs/overlayfs/util.c | |
parent | c5bef3a72b9d8a2040d5e9f4bde03db7c86bbfce (diff) | |
download | linux-5cf5b477f0ca33f56a30c7ec00e61a6204da2efb.tar.bz2 |
ovl: opaque cleanup
oe->opaque is set for
a) whiteouts
b) directories having the "trusted.overlay.opaque" xattr
Case b can be simplified, since setting the xattr always implies setting
oe->opaque. Also once set, the opaque flag is never cleared.
Don't need to set opaque flag for non-directories.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/util.c')
-rw-r--r-- | fs/overlayfs/util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index 260b215852a3..952286f4826c 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c @@ -170,10 +170,11 @@ bool ovl_dentry_is_whiteout(struct dentry *dentry) return !dentry->d_inode && ovl_dentry_is_opaque(dentry); } -void ovl_dentry_set_opaque(struct dentry *dentry, bool opaque) +void ovl_dentry_set_opaque(struct dentry *dentry) { struct ovl_entry *oe = dentry->d_fsdata; - oe->opaque = opaque; + + oe->opaque = true; } bool ovl_redirect_dir(struct super_block *sb) |