[CRIU] [PATCH 2/3] files-reg: Make strip_deleted to return code on hit

Cyrill Gorcunov gorcunov at openvz.org
Mon Aug 10 01:34:26 PDT 2015


To inform a caller that some processing has been done.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 files-reg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/files-reg.c b/files-reg.c
index 1a89e45a89bd..ad40c2951216 100644
--- a/files-reg.c
+++ b/files-reg.c
@@ -645,7 +645,7 @@ static inline bool nfs_silly_rename(char *rpath, const struct fd_parms *parms)
 	return (parms->fs_type == NFS_SUPER_MAGIC) && is_sillyrename_name(rpath);
 }
 
-static void strip_deleted(struct fd_link *link)
+static int strip_deleted(struct fd_link *link)
 {
 	struct dcache_prepends {
 		const char	*str;
@@ -673,8 +673,10 @@ static void strip_deleted(struct fd_link *link)
 				 prepends[i].str, link->name);
 			link->name[at] = '\0';
 			link->len -= prepends[i].len;
+			return 1;
 		}
 	}
+	return 0;
 }
 
 static int check_path_remap(struct fd_link *link, const struct fd_parms *parms,
-- 
2.4.3



More information about the CRIU mailing list