Skip to contentSkip to conversation

Patch "ovl: do not set overlay.opaque on non-dir create" has been added to the 4.11-stable tree

PATCH [email protected] 1 participant 1 message May 17, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ovl: do not set overlay.opaque on non-dir create

to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ovl-do-not-set-overlay.opaque-on-non-dir-create.patch
and it can be found in the queue-4.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 4a99f3c83dc493c8ea84693d78cd792839c8aa64 Mon Sep 17 00:00:00 2001

From: Amir Goldstein <[email protected]>
Date: Mon, 24 Apr 2017 22:26:40 +0300
Subject: ovl: do not set overlay.opaque on non-dir create

From: Amir Goldstein <[email protected]>

commit 4a99f3c83dc493c8ea84693d78cd792839c8aa64 upstream.

The optimization for opaque dir create was wrongly being applied also to non-dir create.

Fixes 97c684cc9110 ("ovl: create directories inside merged parent opaque")
---
 fs/overlayfs/dir.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/dir.c +1 -1
@@ -210,7 +210,7 @@ static int ovl_create_upper(struct dentr
 	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);
 	}

Patches currently in stable-queue which might be from [email protected] are

queue-4.11/ovl-do-not-set-overlay.opaque-on-non-dir-create.patch