diff options
author | Amir Goldstein <amir73il@gmail.com> | 2017-04-24 21:26:40 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2017-04-26 14:33:44 +0200 |
commit | 4a99f3c83dc493c8ea84693d78cd792839c8aa64 (patch) | |
tree | e65e0416cdf22e3931fb2f9ef2aea9a0f4da1a3b /fs/overlayfs/dir.c | |
parent | ovl: check IS_APPEND() on real upper inode (diff) | |
download | linux-4a99f3c83dc493c8ea84693d78cd792839c8aa64.tar.xz linux-4a99f3c83dc493c8ea84693d78cd792839c8aa64.zip |
ovl: do not set overlay.opaque on non-dir create
The optimization for opaque dir create was wrongly being applied
also to non-dir create.
Fixes: 97c684cc9110 ("ovl: create directories inside merged parent opaque")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org> # v4.10
Diffstat (limited to 'fs/overlayfs/dir.c')
-rw-r--r-- | fs/overlayfs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index 6515796460df..bfabc65fdc74 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -210,7 +210,7 @@ static int ovl_create_upper(struct dentry *dentry, struct inode *inode, if (err) goto out_dput; - if (ovl_type_merge(dentry->d_parent)) { + if (ovl_type_merge(dentry->d_parent) && d_is_dir(newdentry)) { /* Setting opaque here is just an optimization, allow to fail */ ovl_set_opaque(dentry, newdentry); } |