Many pre-operative overall survival (OS) prediction methods have been proposed to assist personalized treatment of diffuse glioma for better prognosis. Most of them utilize pre-operative data, while post-operative data, which contains essential prognosis-related information (e.g., surgical outcomes and lesion evolution) is neglected, hindering prediction accuracy. However, incorporating post-operative data could make OS prediction inapplicable at pre-operative stage, affecting clinical utility. To address this contradiction, in this paper, we propose an effective framework that leverages longitudinal data (pre- and post-operative data) to enhance pre-operative OS prediction. Specifically, two OS prediction networks are built in a knowledge distillation framework. One is the teacher network trained with longitudinal data, and the other is the student network relying solely on pre-operative data. Distillation of deep features is conducted to align the performance of the student network with that of the teacher network. Moreover, mass effect and its distillation are adopted to incorporate lesion evolution information, further enhancing prediction performance. Based on our framework, the student network can leverage essential post-operative information without compromising its applicability at pre-operative stage. Experiments on both in-house and public datasets demonstrate that the student network outperforms all state-of-the-art methods under evaluation with statistical significance. Further ablation study reveals that distillation of mass effect and deep features play positive roles in OS prediction. Moreover, new prognosis-related factors are discovered by comparing the student network with and without distillation. Codes are available at https://github.com/LiJiannan2000/OSPred.