Lines Matching refs:nc
275 struct nscookie *nc) in nsinfo__mountns_enter() argument
282 if (nc == NULL) in nsinfo__mountns_enter()
285 nc->oldns = -1; in nsinfo__mountns_enter()
286 nc->newns = -1; in nsinfo__mountns_enter()
309 nc->oldcwd = oldcwd; in nsinfo__mountns_enter()
310 nc->oldns = oldns; in nsinfo__mountns_enter()
311 nc->newns = newns; in nsinfo__mountns_enter()
322 void nsinfo__mountns_exit(struct nscookie *nc) in nsinfo__mountns_exit() argument
324 if (nc == NULL || nc->oldns == -1 || nc->newns == -1 || !nc->oldcwd) in nsinfo__mountns_exit()
327 setns(nc->oldns, CLONE_NEWNS); in nsinfo__mountns_exit()
329 if (nc->oldcwd) { in nsinfo__mountns_exit()
330 WARN_ON_ONCE(chdir(nc->oldcwd)); in nsinfo__mountns_exit()
331 zfree(&nc->oldcwd); in nsinfo__mountns_exit()
334 if (nc->oldns > -1) { in nsinfo__mountns_exit()
335 close(nc->oldns); in nsinfo__mountns_exit()
336 nc->oldns = -1; in nsinfo__mountns_exit()
339 if (nc->newns > -1) { in nsinfo__mountns_exit()
340 close(nc->newns); in nsinfo__mountns_exit()
341 nc->newns = -1; in nsinfo__mountns_exit()