Re: move O_LARGEFILE forcing to filp_open()

From: William Lee Irwin III
Date: Sun Jul 04 2004 - 13:43:13 EST


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.

On Sun, Jul 04, 2004 at 10:52:02AM -0700, William Lee Irwin III wrote:
> Quite right.
[...]
> + 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;
> + }

With my stuff, the compat_sys_open() patch, and the compat_sys_open()
MAX_NON_LFS patch in place, things pass quick manual backward
compatibility testing (basically, one small app that does open() of a
large file sees the right results with and without O_LARGEFILE where it
didn't before).

-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/