IB/core: Fix mismatch between locked and pinned pages