/* Called when an inode is about to be open. We use this to disallow opening large files on 32bit systems if the caller didn't specify O_LARGEFILE. On 64bit systems we force on this flag in sys_open.  */
int generic_file_open(struct inode *inode, struct file *filp)
/* Called when an inode is about to be open. We use this to disallow opening large files on 32bit systems if the caller didn't specify O_LARGEFILE. On 64bit systems we force on this flag in sys_open.  */
int generic_file_open(struct inode *inode, struct file *filp)
{
	if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS)
		return -EOVERFLOW;
	return 0;
}