> { > - struct inode *inode_in = file_inode(file_in); > - struct inode *inode_out = file_inode(file_out); > + struct inode *inode_in = file_in->f_mapping->host; > + struct inode *inode_out = file_out->f_mapping->host; This doesn't directly have anything to do with block devices, as regular files can also have a f_mapping that's different. None of the file systems actually supporting copy offload right now do, but changing the dereference here is a correctness thing totally independent of block device support.