Quoting Matt Helsley (matthltc@xxxxxxxxxx): > On Tue, Oct 20, 2009 at 07:31:28PM -0500, Serge E. Hallyn wrote: > > Quoting Matt Helsley (matthltc@xxxxxxxxxx): > > <snip> > > > > +struct file* ep_file_restore(struct ckpt_ctx *ctx, > > > + struct ckpt_hdr_file *h) > > > +{ > > > + struct file *epfile; > > > + int epfd, ret; > > > + > > > + if (h->h.type != CKPT_HDR_FILE || > > > + h->h.len != sizeof(*h) || > > > + h->f_type != CKPT_FILE_EPOLL) > > > + return ERR_PTR(-EINVAL); > > > + > > > + epfd = sys_epoll_create1(h->f_flags & EPOLL_CLOEXEC); > > > + if (epfd < 0) > > > + return ERR_PTR(epfd); > > > + epfile = fget(epfd); > > > + sys_close(epfd); /* harmless even if an error occured */ > > > + BUG_ON(!epfile); > > > > Would perhaps return ERR_PTR(-ENOENT) be nicer? (And maybe safer - I'm > > not quite clear on under which arches BUG_ON does nothing). > > OK, good idea. Mind if I post it as a separate patch to be merged with > this series? Haha, yeah, pls don't repost the whole patch with a two-line change :) -serge _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers