* [PATCH] ovl: do not set overlay.opaque on non-dir create
@ 2017-04-24 19:26 Amir Goldstein
2017-04-26 13:56 ` Miklos Szeredi
0 siblings, 1 reply; 2+ messages in thread
From: Amir Goldstein @ 2017-04-24 19:26 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: linux-unionfs, # v4 . 10
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>
Cc: <stable@vger.kernel.org> # v4.10
---
fs/overlayfs/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
index 6ef35e8..5d64550 100644
--- a/fs/overlayfs/dir.c
+++ b/fs/overlayfs/dir.c
@@ -228,7 +228,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);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ovl: do not set overlay.opaque on non-dir create
2017-04-24 19:26 [PATCH] ovl: do not set overlay.opaque on non-dir create Amir Goldstein
@ 2017-04-26 13:56 ` Miklos Szeredi
0 siblings, 0 replies; 2+ messages in thread
From: Miklos Szeredi @ 2017-04-26 13:56 UTC (permalink / raw)
To: Amir Goldstein; +Cc: linux-unionfs
On Mon, Apr 24, 2017 at 9:26 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> 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>
> Cc: <stable@vger.kernel.org> # v4.10
Thanks, applied.
Miklos
> ---
> fs/overlayfs/dir.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
> index 6ef35e8..5d64550 100644
> --- a/fs/overlayfs/dir.c
> +++ b/fs/overlayfs/dir.c
> @@ -228,7 +228,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);
> }
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-26 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 19:26 [PATCH] ovl: do not set overlay.opaque on non-dir create Amir Goldstein
2017-04-26 13:56 ` Miklos Szeredi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.