From: Miklos Szeredi Date: Fri, 12 Dec 2014 23:59:43 +0000 (+0100) Subject: ovl: dont replace opaque dir X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=263b4a0fee43f1239c4d6f3c3a62fb5a20d84f2e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ovl: dont replace opaque dir When removing an empty opaque directory, then it makes no sense to replace it with an exact replica of itself before removal. Signed-off-by: Miklos Szeredi --- diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index ab50bd111feb..dcae3ac5aa76 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -506,7 +506,7 @@ static int ovl_remove_and_whiteout(struct dentry *dentry, bool is_dir) struct dentry *opaquedir = NULL; int err; - if (is_dir) { + if (is_dir && OVL_TYPE_MERGE_OR_LOWER(ovl_path_type(dentry))) { opaquedir = ovl_check_empty_and_clear(dentry); err = PTR_ERR(opaquedir); if (IS_ERR(opaquedir))