Skip to contentSkip to conversation

use generic_file_open in udf

PATCH New Christoph Hellwig 1 participant 1 message Oct 21, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use generic_file_open in udf

let's try to reduce the number of hand-crafted LFS checks

fs/udf/file.c +1 -21
@@ -254,30 +254,10 @@
 	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,