path.c: optimize adjust_shared_perm()