patch-2.3.30 linux/fs/open.c

Next file: linux/fs/pipe.c
Previous file: linux/fs/ntfs/super.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.29/linux/fs/open.c linux/fs/open.c
@@ -55,14 +55,14 @@
 	return error;
 }
 
-int do_truncate(struct dentry *dentry, unsigned long length)
+int do_truncate(struct dentry *dentry, loff_t length)
 {
 	struct inode *inode = dentry->d_inode;
 	int error;
 	struct iattr newattrs;
 
-	/* Not pretty: "inode->i_size" shouldn't really be "off_t". But it is. */
-	if ((off_t) length < 0)
+	/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
+	if (length < 0)
 		return -EINVAL;
 
 	down(&inode->i_sem);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)