patch-2.3.48 linux/fs/hfs/file_cap.c

Next file: linux/fs/hfs/file_hdr.c
Previous file: linux/fs/hfs/file.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.47/linux/fs/hfs/file_cap.c linux/fs/hfs/file_cap.c
@@ -31,8 +31,6 @@
 				 hfs_rwarg_t, loff_t *);
 static hfs_rwret_t cap_info_write(struct file *, const char *,
 				  hfs_rwarg_t, loff_t *);
-static void cap_info_truncate(struct inode *);
-
 /*================ Function-like macros ================*/
 
 /*
@@ -46,26 +44,14 @@
 
 /*================ Global variables ================*/
 
-static struct file_operations hfs_cap_info_operations = {
+struct file_operations hfs_cap_info_operations = {
 	read:		cap_info_read,
 	write:		cap_info_write,
 	fsync:		file_fsync,
 };
 
 struct inode_operations hfs_cap_info_inode_operations = {
-	&hfs_cap_info_operations,	/* default file operations */
-	NULL,				/* create */
-	NULL,				/* lookup */
-	NULL,				/* link */
-	NULL,				/* unlink */
-	NULL,				/* symlink */
-	NULL,				/* mkdir */
-	NULL,				/* rmdir */
-	NULL,				/* mknod */
-	NULL,				/* rename */
-	NULL,				/* readlink */
-	NULL,				/* follow_link */
-	cap_info_truncate,		/* truncate */
+	setattr:	hfs_notify_change_cap,
 };
 
 /*================ File-local functions ================*/
@@ -264,18 +250,4 @@
 	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
 	mark_inode_dirty(inode);
 	return count;
-}
-
-/*
- * cap_info_truncate()
- *
- * This is the truncate field in the inode_operations structure for
- * CAP metadata files.
- */
-static void cap_info_truncate(struct inode *inode)
-{
-	if (inode->i_size > HFS_FORK_MAX) {
-		inode->i_size = HFS_FORK_MAX;
-		mark_inode_dirty(inode);
-	}
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)