Commit 9c0c23c0 authored by Pavel Emelyanov's avatar Pavel Emelyanov

files: Don't unlink ghost directory

It will be rmdir-ed a bit later.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 49f27969
...@@ -758,7 +758,9 @@ int open_path(struct file_desc *d, ...@@ -758,7 +758,9 @@ int open_path(struct file_desc *d,
} }
if (rfi->remap) { if (rfi->remap) {
unlink(rfi->path); if (!rfi->remap->is_dir)
unlink(rfi->path);
BUG_ON(!rfi->remap->users); BUG_ON(!rfi->remap->users);
if (--rfi->remap->users == 0) { if (--rfi->remap->users == 0) {
pr_info("Unlink the ghost %s\n", rfi->remap->path); pr_info("Unlink the ghost %s\n", rfi->remap->path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment