On Fri, 18 Jul 2014 10:19:30 -0700 Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > > +nfs4_set_delegation(struct nfs4_client *clp, struct svc_fh *fh, > > + struct nfs4_file *fp) > > { > > - int status = 0; > > + int status; > > + struct nfs4_delegation *dp; > > > > if (fp->fi_had_conflict) > > - return -EAGAIN; > > + return ERR_PTR(-EAGAIN); > > + > > + dp = alloc_init_deleg(clp, fh); > > + if (!dp) > > + return ERR_PTR(-ENOMEM); > > + > > get_nfs4_file(fp); > > Seems like we should pass the file pointer to alloc_init_deleg as well > so it can set that one one up and grab the reference without any lock? > > Otherwise looks good, > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> I actually started to do a patch that did that, but the error handling turned out to be a little twisted. Might be reasonable for a future cleanup though. -- Jeff Layton <jlayton@xxxxxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html