[CRIU] [PATCH 6/7] mount: Shrink lookup_nsid_by_mnt_id

Cyrill Gorcunov gorcunov at openvz.org
Tue Aug 11 07:18:10 PDT 2015


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 mount.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/mount.c b/mount.c
index da5fbed5779f..a44c42143eb2 100644
--- a/mount.c
+++ b/mount.c
@@ -2786,11 +2786,7 @@ struct ns_id *lookup_nsid_by_mnt_id(int mnt_id)
 		mi = mntinfo;
 	else
 		mi = lookup_mnt_id(mnt_id);
-
-	if (mi == NULL)
-		return NULL;
-
-	return mi->nsid;
+	return mi ? mi->nsid : NULL;
 }
 
 int mntns_get_root_by_mnt_id(int mnt_id)
-- 
2.4.3



More information about the CRIU mailing list