lib/rwsem.c: fix compatibility issues with Linux 3.1.y