aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2014-12-12 18:59:43 -0500
committerMiklos Szeredi <mszeredi@suse.cz>2014-12-12 18:59:43 -0500
commit263b4a0fee43f1239c4d6f3c3a62fb5a20d84f2e (patch)
treea44a98b06e671836ecaa3604af2c37c47a0f3836
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>
-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)
506 struct dentry *opaquedir = NULL; 506 struct dentry *opaquedir = NULL;
507 int err; 507 int err;
508 508
509 if (is_dir) { 509 if (is_dir && OVL_TYPE_MERGE_OR_LOWER(ovl_path_type(dentry))) {
510 opaquedir = ovl_check_empty_and_clear(dentry); 510 opaquedir = ovl_check_empty_and_clear(dentry);
511 err = PTR_ERR(opaquedir); 511 err = PTR_ERR(opaquedir);
512 if (IS_ERR(opaquedir)) 512 if (IS_ERR(opaquedir))