[PATCH OLK-6.6 416/451] file: add take_fd() cleanup helper