diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-07-05 23:09:37 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-07-05 23:09:37 +0000 |
commit | aba344fdfed81b2c03d6114c54cfd73a486aa10b (patch) | |
tree | d032d8430bf1234c3ecc6f6330d6de6e887e5963 /fs/locks.c | |
parent | 40c138bfc6d37dbff5339f84575db1e3cec6e34e (diff) |
Merge with Linux 2.3.9.
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/locks.c b/fs/locks.c index 301b92c9e..728985c34 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -563,11 +563,14 @@ int locks_verify_area(int read_write, struct inode *inode, struct file *filp, /* 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) |