public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* move O_LARGEFILE forcing to filp_open()
@ 2004-07-04  6:41 William Lee Irwin III
  2004-07-04  6:44 ` force O_LARGEFILE in sys_swapon() and sys_swapoff() William Lee Irwin III
  2004-07-04 12:22 ` move O_LARGEFILE forcing to filp_open() Arnd Bergmann
  0 siblings, 2 replies; 13+ messages in thread
From: William Lee Irwin III @ 2004-07-04  6:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, hugh

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)) {

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

end of thread, other threads:[~2004-07-04 19:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-04  6:41 move O_LARGEFILE forcing to filp_open() William Lee Irwin III
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox