Lines Matching refs:nc
280 struct nscookie *nc) in nsinfo__mountns_enter() argument
287 if (nc == NULL) in nsinfo__mountns_enter()
290 nc->oldns = -1; in nsinfo__mountns_enter()
291 nc->newns = -1; in nsinfo__mountns_enter()
314 nc->oldcwd = oldcwd; in nsinfo__mountns_enter()
315 nc->oldns = oldns; in nsinfo__mountns_enter()
316 nc->newns = newns; in nsinfo__mountns_enter()
327 void nsinfo__mountns_exit(struct nscookie *nc) in nsinfo__mountns_exit() argument
329 if (nc == NULL || nc->oldns == -1 || nc->newns == -1 || !nc->oldcwd) in nsinfo__mountns_exit()
332 setns(nc->oldns, CLONE_NEWNS); in nsinfo__mountns_exit()
334 if (nc->oldcwd) { in nsinfo__mountns_exit()
335 WARN_ON_ONCE(chdir(nc->oldcwd)); in nsinfo__mountns_exit()
336 zfree(&nc->oldcwd); in nsinfo__mountns_exit()
339 if (nc->oldns > -1) { in nsinfo__mountns_exit()
340 close(nc->oldns); in nsinfo__mountns_exit()
341 nc->oldns = -1; in nsinfo__mountns_exit()
344 if (nc->newns > -1) { in nsinfo__mountns_exit()
345 close(nc->newns); in nsinfo__mountns_exit()
346 nc->newns = -1; in nsinfo__mountns_exit()