OSDN Git Service

initrd: switch initrd loading to struct file based APIs
authorChristoph Hellwig <hch@lst.de>
Sat, 6 Jun 2020 12:49:58 +0000 (14:49 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 30 Jul 2020 06:22:47 +0000 (08:22 +0200)
commitbef173299613404f55b11180d9a865861637f31d
treeae9c16bffe55d739ab86c4e106a39ce21512885c
parent899ac10cc0bdaaee3b908e390bf94d2f1ba5d512
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>
fs/read_write.c
include/linux/syscalls.h
init/do_mounts_rd.c