patch-2.2.0-pre1 linux/fs/read_write.c

Next file: linux/fs/smbfs/inode.c
Previous file: linux/fs/open.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.132/linux/fs/read_write.c linux/fs/read_write.c
@@ -215,7 +215,8 @@
 		tot_len += iov[i].iov_len;
 
 	inode = file->f_dentry->d_inode;
-	ret = locks_verify_area((type == VERIFY_READ
+	/* VERIFY_WRITE actually means a read, as we write to user space */
+	ret = locks_verify_area((type == VERIFY_WRITE
 				 ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE),
 				inode, file, file->f_pos, tot_len);
 	if (ret) goto out;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov