From a9c62a18a291499d15a370d08771e781fbaf91e6 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 16 Oct 2007 23:30:22 -0700 Subject: 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 Cc: Theodore Tso Cc: Jens Axboe Cc: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ntfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ntfs/file.c') diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index c814204d4ea..6cd08dfdc2e 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); } -- cgit v1.2.3-70-g09d2