瀏覽代碼

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>
Miklos Szeredi 11 年之前
父節點
當前提交
263b4a0fee
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/overlayfs/dir.c

+ 1 - 1
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))