]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/hfsplus/inode.c
hfsplus: missing O_LARGEFILE check
[linux-2.6-omap-h63xx.git] / fs / hfsplus / inode.c
index b085d64a2b672580e328be86af33475e87544f6e..963be644297aeb45c2d376721c5cc70ee8ce28f5 100644 (file)
@@ -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;
 }