[RFC]:lock_super race possible?

From: Amit S. Kale (akale@veritas.com)
Date: Fri May 19 2000 - 07:18:24 EST


Hi,

lock_super is currently implemented as follows:
        if (sb->s_lock)
                __wait_on_super(sb);
        sb->s_lock ;

Can this give rise to a race condition?

I think using a semaphore for this purpose would be better.
Or at least
           while(test_and_set_bit(1, &sb->s_lock))
                   __wait_on_super(sb);

Regards.

--
Amit Kale
Veritas Software ( http://www.veritas.com )

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:17 EST