[OpenAFS-devel] [PATCH] fix file locking crash on linux

Jeffrey Hutzelman jhutz@cmu.edu
Fri, 09 Feb 2007 12:31:47 -0500


On Thursday, February 08, 2007 04:04:43 PM -0500 Christopher Allen Wing 
<wingc@engin.umich.edu> wrote:

> The following fixes the crash and seems ok on RHEL4 (2.6.9 kernel).  I
> haven't tried it on newer 2.6 kernels.  I might have an opportunity to
> try it out on RHEL5 tomorrow, which is 2.6.18 based and thus has the
> 'new' API for flock_lock_file*().
>
> I believe it is safe to just clear FL_SLEEP in the structure handed to
> us, assuming that we want to retain the current semantics (tell the
> kernel never to wait when we ask it to perform a locking operation):

Which crash are you trying to fix?  The code != EAGAIN assert?
We determined that the assert was just wrong, and the right fix is to 
remove it.