Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a9c62a18a291499d15a370d08771e781fbaf91e6
Commit:     a9c62a18a291499d15a370d08771e781fbaf91e6
Parent:     28e3fed8b79c76450f264e77c58d0f5fbd2dd739
Author:     Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:30:22 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:43:01 2007 -0700

    fs: correct SuS compliance for open of large file without options
    
    The early LFS work that Linux uses favours EFBIG in various places. SuSv3
    specifically uses EOVERFLOW for this as noted by Michael (Bug 7253)
    
    [EOVERFLOW]
        The named file is a regular file and the size of the file cannot be
    represented correctly in an object of type off_t. We should therefore
    transition to the proper error return code
    
    Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
    Cc: Theodore Tso <[EMAIL PROTECTED]>
    Cc: Jens Axboe <[EMAIL PROTECTED]>
    Cc: Arjan van de Ven <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/gfs2/ops_file.c |    2 +-
 fs/ntfs/file.c     |    2 +-
 fs/open.c          |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 7eb4b28..bb11fd6 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -406,7 +406,7 @@ static int gfs2_open(struct inode *inode, struct file *file)
 
                if (!(file->f_flags & O_LARGEFILE) &&
                    ip->i_di.di_size > MAX_NON_LFS) {
-                       error = -EFBIG;
+                       error = -EOVERFLOW;
                        goto fail_gunlock;
                }
 
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index c814204..6cd08df 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -61,7 +61,7 @@ static int ntfs_file_open(struct inode *vi, struct file *filp)
 {
        if (sizeof(unsigned long) < 8) {
                if (i_size_read(vi) > MAX_LFS_FILESIZE)
-                       return -EFBIG;
+                       return -EOVERFLOW;
        }
        return generic_file_open(vi, filp);
 }
diff --git a/fs/open.c b/fs/open.c
index 044bfa8..cdbb94a 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -1177,7 +1177,7 @@ asmlinkage long sys_vhangup(void)
 int generic_file_open(struct inode * inode, struct file * filp)
 {
        if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS)
-               return -EFBIG;
+               return -EOVERFLOW;
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to