[PATCH 2/6] mf: Add a helper to set closed state for the session.