patch-1.3.86 linux/fs/open.c

Next file: linux/fs/read_write.c
Previous file: linux/fs/nfs/nfsroot.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.85/linux/fs/open.c linux/fs/open.c
@@ -107,9 +107,9 @@
 		iput(inode);
 		return error;
 	}
-	error = locks_verify(FLOCK_VERIFY_WRITE, inode, NULL,
-			     length < inode->i_size ? length : inode->i_size,
-			     abs(inode->i_size - length));
+	error = locks_verify_area(FLOCK_VERIFY_WRITE, inode, NULL,
+				  length < inode->i_size ? length : inode->i_size,
+				  abs(inode->i_size - length));
 	if (error)
 		return error;
 	error = do_truncate(inode, length);
@@ -132,9 +132,9 @@
 		return -EACCES;
 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
 		return -EPERM;
-	error = locks_verify(FLOCK_VERIFY_WRITE, inode, file,
-			     length < inode->i_size ? length : inode->i_size,
-			     abs(inode->i_size - length));
+	error = locks_verify_area(FLOCK_VERIFY_WRITE, inode, file,
+				  length < inode->i_size ? length : inode->i_size,
+				  abs(inode->i_size - length));
 	if (error)
 		return error;
 	return do_truncate(inode, length);

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