Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e715294 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

hfsplus: missing O_LARGEFILE check

hfsplus: O_LARGEFILE checking is missing

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=8490



From: Alan Cox <alan@redhat.com>
Reported-by: default avatardidier <did447@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cdbf6dba
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
}