files: Don't unlink ghost directory

It will be rmdir-ed a bit later.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov 2014-07-04 15:55:52 +04:00
parent 49f27969f5
commit 9c0c23c067

View file

@ -758,7 +758,9 @@ int open_path(struct file_desc *d,
}
if (rfi->remap) {
unlink(rfi->path);
if (!rfi->remap->is_dir)
unlink(rfi->path);
BUG_ON(!rfi->remap->users);
if (--rfi->remap->users == 0) {
pr_info("Unlink the ghost %s\n", rfi->remap->path);