mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
initrd: switch initrd loading to struct file based APIs
There is no good reason to mess with file descriptors from in-kernel code, switch the initrd loading to struct file based read and writes instead. Also Pass an explicit offset instead of ->f_pos, and to make that easier, use file scope file structs and offsets everywhere except for identify_ramdisk_image instead of the current strange mix. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -301,7 +301,7 @@ loff_t vfs_llseek(struct file *file, loff_t offset, int whence)
|
||||
}
|
||||
EXPORT_SYMBOL(vfs_llseek);
|
||||
|
||||
off_t ksys_lseek(unsigned int fd, off_t offset, unsigned int whence)
|
||||
static off_t ksys_lseek(unsigned int fd, off_t offset, unsigned int whence)
|
||||
{
|
||||
off_t retval;
|
||||
struct fd f = fdget_pos(fd);
|
||||
|
Reference in New Issue
Block a user