per-partition swapfile fix

1. fix two warning reported by lockdep
2. fix a potential deadlock