All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] early init: open /dev/console with O_LARGEFILE
@ 2019-12-31 15:02 Dominik Brodowski
  2019-12-31 15:55 ` youling 257
  2020-01-01  0:30 ` Arvind Sankar
  0 siblings, 2 replies; 18+ messages in thread
From: Dominik Brodowski @ 2019-12-31 15:02 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, viro, youling257

If force_o_largefile() is true, /dev/console used to be opened
with O_LARGEFILE. Retain that behaviour.

Fixes: 8243186f0cc7 ("fs: remove ksys_dup()")
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

diff --git a/init/main.c b/init/main.c
index 1ecfd43ed464..d12777775cb0 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1162,7 +1162,8 @@ void console_on_rootfs(void)
 	unsigned int i;
 
 	/* Open /dev/console in kernelspace, this should never fail */
-	file = filp_open("/dev/console", O_RDWR, 0);
+	file = filp_open("/dev/console",
+			  O_RDWR | (force_o_largefile() ? O_LARGEFILE : 0), 0);
 	if (IS_ERR(file))
 		goto err_out;
 

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-01-02 17:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-31 15:02 [PATCH] early init: open /dev/console with O_LARGEFILE Dominik Brodowski
2019-12-31 15:55 ` youling 257
2020-01-01  0:30 ` Arvind Sankar
2020-01-01 10:43   ` Dominik Brodowski
2020-01-01 13:27     ` youling 257
2020-01-01 17:24       ` Dominik Brodowski
2020-01-01 17:59       ` Arvind Sankar
2020-01-01 18:42         ` Dominik Brodowski
2020-01-01 18:49           ` youling 257
2020-01-01 18:32   ` Arvind Sankar
2020-01-01 21:39     ` Linus Torvalds
2020-01-01 22:50       ` Arvind Sankar
2020-01-01 23:01         ` Linus Torvalds
2020-01-01 23:08           ` Arvind Sankar
2020-01-02  3:09       ` youling 257
2020-01-02  4:00         ` Linus Torvalds
2020-01-02  4:10           ` Arvind Sankar
2020-01-02 17:53       ` Dominik Brodowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.