Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a99f3c8 authored by Amir Goldstein's avatar Amir Goldstein Committed by Miklos Szeredi
Browse files

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: 97c684cc ("ovl: create directories inside merged parent opaque")
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org> # v4.10
parent b0990fbb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}