On Fri, May 20, 2011 at 04:16:18PM -0400, Bryan Schumaker wrote: > On 05/20/2011 04:12 PM, bjschuma@xxxxxxxxxx wrote: > > From: Bryan Schumaker <bjschuma@xxxxxxxxxx> > > +static __be32 > > +nfsd4_free_delegation_stateid(stateid_t *stateid) > > +{ > > + struct nfs4_delegation *dp = search_for_delegation(stateid); > > + if (dp) > > + return nfserr_locks_held; > > + return nfserr_bad_stateid; > > +} > > + > > +static __be32 > > +nfsd4_free_lock_stateid(stateid_t *stateid, struct nfs4_stateid *stp) > > +{ > > + if (check_for_locks(stp->st_file, stp->st_stateowner)) > > I'm not sure if stateids are unique to (file, stateowner), but I'm not sure how else to check for locks at the moment. Actually, looking... there's a one-to-one lockowner<->lockstateid correspondance. Which is dumb. The server's handling of lock state needs more serious help than I realized! I think your patch is OK now, though. --b. -- 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