Commit 9a0a81f9 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[PATCH] use generic_file_open in udf

Let's try to reduce the number of hand-crafted LFS checks
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 82c027b3
......@@ -254,30 +254,10 @@ static int udf_release_file(struct inode * inode, struct file * filp)
return 0;
}
/*
* udf_open_file
*
* PURPOSE
* Called when an inode is about to be open.
*
* DESCRIPTION
* Use this to disallow opening RW large files on 32 bit systems.
* On 64 bit systems we force on O_LARGEFILE in sys_open.
*
* HISTORY
*
*/
static int udf_open_file(struct inode * inode, struct file * filp)
{
if ((inode->i_size & 0xFFFFFFFF80000000ULL) && !(filp->f_flags & O_LARGEFILE))
return -EFBIG;
return 0;
}
struct file_operations udf_file_operations = {
.read = generic_file_read,
.ioctl = udf_ioctl,
.open = udf_open_file,
.open = generic_file_open,
.mmap = generic_file_mmap,
.write = udf_file_write,
.release = udf_release_file,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment