summaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2007-10-16 23:30:22 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 08:43:01 -0700
commita9c62a18a291499d15a370d08771e781fbaf91e6 (patch)
tree5d608ba9dfefce643060c1d9ab18d9f4bff18360 /fs/gfs2
parent28e3fed8b79c76450f264e77c58d0f5fbd2dd739 (diff)
downloadlinux-a9c62a18a291499d15a370d08771e781fbaf91e6.tar.gz
linux-a9c62a18a291499d15a370d08771e781fbaf91e6.tar.bz2
linux-a9c62a18a291499d15a370d08771e781fbaf91e6.zip
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 <alan@redhat.com> Cc: Theodore Tso <tytso@mit.edu> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/ops_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 7eb4b280ac66..bb11fd6752d3 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;
}