Skip to content

Commit 899ac10

Browse files
author
Christoph Hellwig
committed
initrd: remove the BLKFLSBUF call in handle_initrd
BLKFLSBUF used to be overloaded for the ramdisk driver to free the whole ramdisk, which was completely different behavior compared to all other drivers. But this magic overload got removed in commit ff26956 ("brd: remove support for BLKFLSBUF"), so this call is entirely pointless now. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Linus Torvalds <[email protected]>
1 parent c837699 commit 899ac10

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

init/do_mounts_initrd.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,12 @@ static void __init handle_initrd(void)
115115
if (!error)
116116
printk("okay\n");
117117
else {
118-
int fd = ksys_open("/dev/root.old", O_RDWR, 0);
119118
if (error == -ENOENT)
120119
printk("/initrd does not exist. Ignored.\n");
121120
else
122121
printk("failed\n");
123122
printk(KERN_NOTICE "Unmounting old root\n");
124123
ksys_umount("/old", MNT_DETACH);
125-
printk(KERN_NOTICE "Trying to free ramdisk memory ... ");
126-
if (fd < 0) {
127-
error = fd;
128-
} else {
129-
error = ksys_ioctl(fd, BLKFLSBUF, 0);
130-
ksys_close(fd);
131-
}
132-
printk(!error ? "okay\n" : "failed\n");
133124
}
134125
}
135126

0 commit comments

Comments
 (0)