It appears that there are (at least) two ways to get the inode (if any) associated with an open file: f_mapping->host (pagecache?) and f_path.dentry->d_inode (dentry cache?). generic_file_llseek uses f_mapping->host; everything else in read_write.c uses f_path.dentry->d_inode. do_sendfile checks for a null inode on its input fd but not on its output fd; nothing else in read_write.c checks for null inode.
Under what circumstances can f_mapping->host and f_path.dentry->d_inode differ? Under what circumstances can either or both of these pointers be null? Under what circumstances is it preferable to retrieve the inode from f_mapping vs. f_path.dentry, either because they differ or because one or the other is more likely to be warm in cache? Cheers, - Michael - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/