Commit cb546f84 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

files-reg: Don't generate ghost files for hanged out slave pty peers

We will use reg-files engine for tty c/r so lets prepare scaffolds
here preventing the engine to generate ghost files for PTY peers
(mostly because one can't create slave peers without opening
 master peers first which is a sole part of tty engine itself).
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4b9406ea
...@@ -680,6 +680,21 @@ static int check_path_remap(struct fd_link *link, const struct fd_parms *parms, ...@@ -680,6 +680,21 @@ static int check_path_remap(struct fd_link *link, const struct fd_parms *parms,
} }
return 0; return 0;
} else if (parms->fs_type == DEVPTS_SUPER_MAGIC) {
/*
* It's safe to call stripping here because
* file paths are having predefined format for
* this FS and can't have a valid " (deleted)"
* postfix as a part of not deleted filename.
*/
strip_deleted(link);
/*
* Devpts devices/files are generated by the
* kernel itself so we should not try to generate
* any kind of ghost files here even if file is
* no longer exist.
*/
return 0;
} }
if (ost->st_nlink == 0) { if (ost->st_nlink == 0) {
......
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