[CRIU] [PATCH 7/9] files-reg: Don't generate ghost files for hanged out slave pty peers
Cyrill Gorcunov
gorcunov at openvz.org
Thu Oct 16 03:27:26 PDT 2014
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: Cyrill Gorcunov <gorcunov at openvz.org>
---
files-reg.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/files-reg.c b/files-reg.c
index 22f19faf1617..445f5cdf041c 100644
--- a/files-reg.c
+++ b/files-reg.c
@@ -680,6 +680,21 @@ static int check_path_remap(struct fd_link *link, const struct fd_parms *parms,
}
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) {
--
1.9.3
More information about the CRIU
mailing list