From: Alan Cox 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 Cc: Theodore Tso Cc: Jens Axboe Cc: Arjan van de Ven Signed-off-by: Andrew Morton --- diff -puN fs/gfs2/ops_file.c~fs-correct-sus-compliance-for-open-of-large-file-without fs/gfs2/ops_file.c --- a/fs/gfs2/ops_file.c~fs-correct-sus-compliance-for-open-of-large-file-without +++ a/fs/gfs2/ops_file.c @@ -406,7 +406,7 @@ static int gfs2_open(struct inode *inode if (!(file->f_flags & O_LARGEFILE) && ip->i_di.di_size > MAX_NON_LFS) { - error = -EFBIG; + error = -EOVERFLOW; goto fail_gunlock; } diff -puN fs/ntfs/file.c~fs-correct-sus-compliance-for-open-of-large-file-without fs/ntfs/file.c --- a/fs/ntfs/file.c~fs-correct-sus-compliance-for-open-of-large-file-without +++ a/fs/ntfs/file.c @@ -61,7 +61,7 @@ static int ntfs_file_open(struct inode * { if (sizeof(unsigned long) < 8) { if (i_size_read(vi) > MAX_LFS_FILESIZE) - return -EFBIG; + return -EOVERFLOW; } return generic_file_open(vi, filp); } diff -puN fs/open.c~fs-correct-sus-compliance-for-open-of-large-file-without fs/open.c --- a/fs/open.c~fs-correct-sus-compliance-for-open-of-large-file-without +++ a/fs/open.c @@ -1178,7 +1178,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; } _