| Kernel v2.3.9 /fs/locks.c |
|---|
 2.3.9
 fs
 locks.c
diff -u --recursive --new-file v2.3.8/linux/fs/locks.c linux/fs/locks.c
--- v2.3.8/linux/fs/locks.c Tue Jun 22 10:45:40 1999
+++ linux/fs/locks.c Mon Jun 28 13:32:28 1999
@@ -563,11 +563,14 @@
/* Candidates for mandatory locking have the setgid bit set
* but no group execute bit - an otherwise meaningless combination.
*/
- if (IS_MANDLOCK(inode) &&
- (inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
- return (locks_mandatory_area(read_write, inode, filp, offset,
- count));
- return (0);
+ if (IS_MANDLOCK(inode) && (inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID) {
+ int retval;
+ lock_kernel();
+ retval = locks_mandatory_area(read_write, inode, filp, offset, count);
+ unlock_kernel();
+ return retval;
+ }
+ return 0;
}
int locks_mandatory_locked(struct inode *inode)
|