Lines Matching refs:nc
209 struct nscookie *nc) in nsinfo__mountns_enter() argument
216 if (nc == NULL) in nsinfo__mountns_enter()
219 nc->oldns = -1; in nsinfo__mountns_enter()
220 nc->newns = -1; in nsinfo__mountns_enter()
243 nc->oldcwd = oldcwd; in nsinfo__mountns_enter()
244 nc->oldns = oldns; in nsinfo__mountns_enter()
245 nc->newns = newns; in nsinfo__mountns_enter()
256 void nsinfo__mountns_exit(struct nscookie *nc) in nsinfo__mountns_exit() argument
258 if (nc == NULL || nc->oldns == -1 || nc->newns == -1 || !nc->oldcwd) in nsinfo__mountns_exit()
261 setns(nc->oldns, CLONE_NEWNS); in nsinfo__mountns_exit()
263 if (nc->oldcwd) { in nsinfo__mountns_exit()
264 WARN_ON_ONCE(chdir(nc->oldcwd)); in nsinfo__mountns_exit()
265 zfree(&nc->oldcwd); in nsinfo__mountns_exit()
268 if (nc->oldns > -1) { in nsinfo__mountns_exit()
269 close(nc->oldns); in nsinfo__mountns_exit()
270 nc->oldns = -1; in nsinfo__mountns_exit()
273 if (nc->newns > -1) { in nsinfo__mountns_exit()
274 close(nc->newns); in nsinfo__mountns_exit()
275 nc->newns = -1; in nsinfo__mountns_exit()