patch-2.3.46 linux/include/linux/fs.h

Next file: linux/include/linux/genhd.h
Previous file: linux/include/linux/fb.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.45/linux/include/linux/fs.h linux/include/linux/fs.h
@@ -744,6 +744,19 @@
 	return 0;
 }
 
+extern inline int locks_verify_truncate(struct inode *inode,
+				    struct file *filp,
+				    loff_t size)
+{
+	if (inode->i_flock && MANDATORY_LOCK(inode))
+		return locks_mandatory_area(
+			FLOCK_VERIFY_WRITE, inode, filp,
+			size < inode->i_size ? size : inode->i_size,
+			abs(inode->i_size - size)
+		);
+	return 0;
+}
+
 
 /* fs/open.c */
 
@@ -774,6 +787,8 @@
 extern int blkdev_put(struct block_device *, int);
 
 /* fs/devices.c */
+extern const struct block_device_operations *get_blkfops(unsigned int);
+extern struct file_operations *get_chrfops(unsigned int, unsigned int);
 extern int register_chrdev(unsigned int, const char *, struct file_operations *);
 extern int unregister_chrdev(unsigned int, const char *);
 extern int chrdev_open(struct inode *, struct file *);
@@ -1003,6 +1018,8 @@
 unsigned long generate_cluster(kdev_t, int b[], int);
 unsigned long generate_cluster_swab32(kdev_t, int b[], int);
 extern kdev_t ROOT_DEV;
+extern char root_device_name[];
+
 
 extern void show_buffers(void);
 extern void mount_root(void);

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