patch-1.3.86 linux/mm/mmap.c
Next file: linux/net/802/Makefile
Previous file: linux/mm/filemap.c
Back to the patch index
Back to the overall index
- Lines: 12
- Date:
Wed Apr 10 08:41:08 1996
- Orig file:
v1.3.85/linux/mm/mmap.c
- Orig date:
Fri Mar 22 14:07:14 1996
diff -u --recursive --new-file v1.3.85/linux/mm/mmap.c linux/mm/mmap.c
@@ -73,6 +73,11 @@
case MAP_SHARED:
if ((prot & PROT_WRITE) && !(file->f_mode & 2))
return -EACCES;
+ /*
+ * make sure there are no mandatory locks on the file.
+ */
+ if (locks_verify_locked(file->f_inode))
+ return -EAGAIN;
/* fall through */
case MAP_PRIVATE:
if (!(file->f_mode & 1))
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