summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2014-12-13 00:59:43 +0100
committerMiklos Szeredi <mszeredi@suse.cz>2014-12-13 00:59:43 +0100
commit263b4a0fee43f1239c4d6f3c3a62fb5a20d84f2e (patch)
treea44a98b06e671836ecaa3604af2c37c47a0f3836 /fs
parent1afaba1ecb5299cdd0f69b5bad98b0185fe71e79 (diff)
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 <mszeredi@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/overlayfs/dir.c2
1 files changed, 1 insertions, 1 deletions
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))