patch-2.4.1 linux/fs/hpfs/inode.c

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

diff -u --recursive --new-file v2.4.0/linux/fs/hpfs/inode.c linux/fs/hpfs/inode.c
@@ -299,6 +299,7 @@
 {
 	struct inode *inode = dentry->d_inode;
 	int error;
+	if ((attr->ia_valid & ATTR_SIZE) && attr->ia_size > inode->i_size) return -EINVAL;
 	if (inode->i_sb->s_hpfs_root == inode->i_ino) return -EINVAL;
 	if ((error = inode_change_ok(inode, attr))) return error;
 	inode_setattr(inode, attr);

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