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

Next file: linux/include/linux/if_frad.h
Previous file: linux/include/asm-i386/string.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.85/linux/include/linux/fs.h linux/include/linux/fs.h
@@ -354,19 +354,29 @@
 #define FLOCK_VERIFY_READ  1
 #define FLOCK_VERIFY_WRITE 2
 
-extern int locks_locked_mandatory(int read_write, struct inode *inode,
-				  struct file *filp, unsigned int offset,
-				  unsigned int count);
-extern inline int locks_verify(int read_write, struct inode *inode,
-			       struct file *filp, unsigned int offset,
-			       unsigned int count)
+extern int locks_mandatory_locked(struct inode *inode);
+extern inline int locks_verify_locked(struct inode *inode)
 {
 	/* Candidates for mandatory locking have the setgid bit set
 	 * but no group execute bit -  an otherwise meaningless combination.
 	 */
 	if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
-		return (locks_locked_mandatory(read_write, inode, filp,
-					       offset, count));
+		return (locks_mandatory_locked(inode));
+	return (0);
+}
+extern int locks_mandatory_area(int read_write, struct inode *inode,
+				struct file *filp, unsigned int offset,
+				unsigned int count);
+extern inline int locks_verify_area(int read_write, struct inode *inode,
+				    struct file *filp, unsigned int offset,
+				    unsigned int count)
+{
+	/* Candidates for mandatory locking have the setgid bit set
+	 * but no group execute bit -  an otherwise meaningless combination.
+	 */
+	if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
+		return (locks_mandatory_area(read_write, inode, filp, offset,
+					     count));
 	return (0);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this