[xfs-masters] RFC: Fix f_flags races without the BKL

Jonathan Corbet corbet at lwn.net
Tue Dec 30 06:49:46 CST 2008


On Mon, 29 Dec 2008 12:57:06 +0100
Sam Ravnborg <sam at ravnborg.org> wrote:

> Rather than open coded mutex how about adding a few helpers to
> set and clear the flags and hide locking there?

There's a couple of problems with that.  One being that SETFL wants to
manipulate a bunch of flags together, so a simple set_flag/clear_flag
interface won't do it.  Beyond that, though, calls to the ->fasync()
function need to be atomic with respect to changes to the associated
flag.

Still, it seems that the global lock approach isn't too popular, so
I'll get back to the drawing board once I'm theoretically not on
vacation.

Thanks,

jon



More information about the xfs-masters mailing list