summaryrefslogtreecommitdiff
path: root/fs/overlayfs/copy_up.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-12-16 13:02:57 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2016-12-16 13:02:57 +0300
commit5cf5b477f0ca33f56a30c7ec00e61a6204da2efb (patch)
treee418f95e7847541a12dc96411d6929f89849ce53 /fs/overlayfs/copy_up.c
parentc5bef3a72b9d8a2040d5e9f4bde03db7c86bbfce (diff)
downloadlinux-5cf5b477f0ca33f56a30c7ec00e61a6204da2efb.tar.xz
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/copy_up.c')
-rw-r--r--fs/overlayfs/copy_up.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
index e191c631b17f..6c3aaf45e9cf 100644
--- a/fs/overlayfs/copy_up.c
+++ b/fs/overlayfs/copy_up.c
@@ -303,12 +303,6 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,
ovl_dentry_update(dentry, newdentry);
ovl_inode_update(d_inode(dentry), d_inode(newdentry));
newdentry = NULL;
-
- /*
- * Non-directores become opaque when copied up.
- */
- if (!S_ISDIR(stat->mode))
- ovl_dentry_set_opaque(dentry, true);
out2:
dput(upper);
out1: