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

Signed-off-by: faux123 <reioux@gmail.com>