From 6e28a4330893dc426f7f207185f0a5c5dd6f6386 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 18 Oct 2008 20:28:01 -0700 Subject: [PATCH] --- yaml --- r: 115926 b: refs/heads/master c: 6e7152944426be786c6c232990914e4565290d35 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/hfsplus/inode.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5739e55b0b5b..bbe4b572185d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cdbf6dba28e8e6268c8420857696309470009fd9 +refs/heads/master: 6e7152944426be786c6c232990914e4565290d35 diff --git a/trunk/fs/hfsplus/inode.c b/trunk/fs/hfsplus/inode.c index b085d64a2b67..963be644297a 100644 --- a/trunk/fs/hfsplus/inode.c +++ b/trunk/fs/hfsplus/inode.c @@ -254,6 +254,8 @@ static int hfsplus_file_open(struct inode *inode, struct file *file) { if (HFSPLUS_IS_RSRC(inode)) inode = HFSPLUS_I(inode).rsrc_inode; + if (!(file->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS) + return -EOVERFLOW; atomic_inc(&HFSPLUS_I(inode).opencnt); return 0; }