public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, hugh@veritas.com
Subject: Re: move O_LARGEFILE forcing to filp_open()
Date: Sun, 4 Jul 2004 10:52:02 -0700	[thread overview]
Message-ID: <20040704175202.GL21066@holomorphy.com> (raw)
In-Reply-To: <200407041949.01126.arnd@arndb.de>

On Sonntag, 4. Juli 2004 19:38, William Lee Irwin III wrote:
>> How does this look as an implementation of that suggestion, incremental
>> to your compat_sys_open() consolidation patch?

On Sun, Jul 04, 2004 at 07:49:00PM +0200, Arnd Bergmann wrote:
> At first sight, it looks like (filp->f_flags & O_LARGEFILE) will always
> be true after calling filp_open, but I don't have time to look closer
> today.

Quite right.


Index: mm5-2.6.7/fs/compat.c
===================================================================
--- mm5-2.6.7.orig/fs/compat.c	2004-07-04 10:29:04.691152200 -0700
+++ mm5-2.6.7/fs/compat.c	2004-07-04 10:51:05.329384672 -0700
@@ -160,6 +160,12 @@
 			error = PTR_ERR(f);
 			if (IS_ERR(f))
 				goto out_error;
+			if (!(flags & O_LARGEFILE) &&
+				i_size_read(f->f_dentry->d_inode) > MAX_NON_LFS) {
+				error = -EFBIG;
+				filp_close(f, current->files);
+				goto out_error;
+			}
 			fd_install(fd, f);
 		}
 out:

  reply	other threads:[~2004-07-04 17:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=20040704175202.GL21066@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@osdl.org \
    --cc=arnd@arndb.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox