All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, hugh@veritas.com
Subject: move O_LARGEFILE forcing to filp_open()
Date: Sat, 3 Jul 2004 23:41:22 -0700	[thread overview]
Message-ID: <20040704064122.GY21066@holomorphy.com> (raw)

Internal kernel open() of files barfs in important contexts, for
instance, using strict non-overcommit with enough swap for large
commitments. This is carried out through the entrypoint filp_open(),
not sys_open(). sys_open() in turn calls filp_open(). So merely
moving the forcing of the flag on 64-bit resolves this situation there,
though not for 32-bit, whose solution is to appear in the sequel.


-- wli

Index: mm5-2.6.7/fs/open.c
===================================================================
--- mm5-2.6.7.orig/fs/open.c	2004-06-15 22:18:56.000000000 -0700
+++ mm5-2.6.7/fs/open.c	2004-07-03 22:58:51.081134896 -0700
@@ -755,6 +755,8 @@
 	int namei_flags, error;
 	struct nameidata nd;
 
+	if (BITS_PER_LONG > 32)
+		flags |= O_LARGEFILE;
 	namei_flags = flags;
 	if ((namei_flags+1) & O_ACCMODE)
 		namei_flags++;
@@ -943,9 +945,6 @@
 	char * tmp;
 	int fd, error;
 
-#if BITS_PER_LONG != 32
-	flags |= O_LARGEFILE;
-#endif
 	tmp = getname(filename);
 	fd = PTR_ERR(tmp);
 	if (!IS_ERR(tmp)) {

             reply	other threads:[~2004-07-04  6:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-04  6:41 William Lee Irwin III [this message]
2004-07-04  6:44 ` force O_LARGEFILE in sys_swapon() and sys_swapoff() William Lee Irwin III
2004-07-04 19:21   ` Hugh Dickins
2004-07-04 19:31     ` William Lee Irwin III
2004-07-04 12:22 ` move O_LARGEFILE forcing to filp_open() Arnd Bergmann
2004-07-04 16:15   ` William Lee Irwin III
2004-07-04 17:22     ` Arnd Bergmann
2004-07-04 17:27       ` William Lee Irwin III
2004-07-04 17:27         ` William Lee Irwin III
2004-07-04 17:38           ` William Lee Irwin III
2004-07-04 17:49             ` Arnd Bergmann
2004-07-04 17:52               ` William Lee Irwin III
2004-07-04 18:42                 ` William Lee Irwin III

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=20040704064122.GY21066@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 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.