[PATCH 6.12 347/393] landlock: Move code to ease future backports