From: Dominik Brodowski <linux@dominikbrodowski.net>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
youling257@gmail.com
Subject: [PATCH] early init: open /dev/console with O_LARGEFILE
Date: Tue, 31 Dec 2019 16:02:26 +0100 [thread overview]
Message-ID: <20191231150226.GA523748@light.dominikbrodowski.net> (raw)
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;
next reply other threads:[~2019-12-31 15:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-31 15:02 Dominik Brodowski [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191231150226.GA523748@light.dominikbrodowski.net \
--to=linux@dominikbrodowski.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=youling257@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®