Lines Matching refs:nc
279 struct nscookie *nc) in nsinfo__mountns_enter() argument
286 if (nc == NULL) in nsinfo__mountns_enter()
289 nc->oldns = -1; in nsinfo__mountns_enter()
290 nc->newns = -1; in nsinfo__mountns_enter()
313 nc->oldcwd = oldcwd; in nsinfo__mountns_enter()
314 nc->oldns = oldns; in nsinfo__mountns_enter()
315 nc->newns = newns; in nsinfo__mountns_enter()
326 void nsinfo__mountns_exit(struct nscookie *nc) in nsinfo__mountns_exit() argument
328 if (nc == NULL || nc->oldns == -1 || nc->newns == -1 || !nc->oldcwd) in nsinfo__mountns_exit()
331 setns(nc->oldns, CLONE_NEWNS); in nsinfo__mountns_exit()
333 if (nc->oldcwd) { in nsinfo__mountns_exit()
334 WARN_ON_ONCE(chdir(nc->oldcwd)); in nsinfo__mountns_exit()
335 zfree(&nc->oldcwd); in nsinfo__mountns_exit()
338 if (nc->oldns > -1) { in nsinfo__mountns_exit()
339 close(nc->oldns); in nsinfo__mountns_exit()
340 nc->oldns = -1; in nsinfo__mountns_exit()
343 if (nc->newns > -1) { in nsinfo__mountns_exit()
344 close(nc->newns); in nsinfo__mountns_exit()
345 nc->newns = -1; in nsinfo__mountns_exit()