Add fallback for dev_inode() for closed files, duck-typed file-like objects, etc.