Re: [PATCH] Remove needless BKL from release functions

Rick Lindsley
2001-11-23T09:46:17Z

Christoph Hellwig <hch@ns.caldera.de> said:

Nope, it's fine to remove it. Input is racy all over the place and the list
are modified somewhere else without any locking anyways.

Horst von Brand <vonbrand@inf.utfsm.cl> then said:

"It is broken anyway, breaking it some more makes no difference"!?

No, it is more a matter of "it is not helping at all, so removing it
makes no difference in behavior." Removing it does, however, help
clean up the code and remove unnecessary instances of the BKL from the
kernel code.

If you check the web page at
http://lse.sourceforge.net/lockhier/patches.html, you'll find
additional information on why this patch was produced. The most common
"no-op" was that (BKL) locking was done during release but not during
open. In some cases, there truly are things to guard. In some cases,
there really isn't. In all cases, nothing was really being correctly
guarded.

Usage of the BKL exists, in many cases, as a legendary artifact. Nobody
is sure if it's really needed, so everybody is afraid to take it out,
"just in case". These patches represent real research -- we believe it
really is safe to take it out in these cases. If we could not be sure,
we didn't try to patch it.

Rick