This patch (made against linux-2.4.4-pre6) makes a number of changes to the rwsem implementation: (1) Fixes a subtle contention bug between up_write and the down_* functions. (2) Optimises the i386 fastpath implementation and changed the slowpath implementation to aid it. - The arch/i386/lib/rwsem.c is now gone. - Better inline asm constraints have been applied. (3) Changed the sparc64 fastpath implementation to use revised slowpath interface. [Dave Miller: can you check this please] (4) Makes the generic spinlock implementation non-inline. - lib/rwsem.c has been duplicated to lib/rwsem-spinlock.c and a slightly different algorithm has been created. This one is simpler since it does not have to use atomic operations on the counters as all accesses to them are governed by a blanket spinlock. David