patch-2.3.45 linux/fs/attr.c

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

diff -u --recursive --new-file v2.3.44/linux/fs/attr.c linux/fs/attr.c
@@ -62,8 +62,10 @@
 		inode->i_uid = attr->ia_uid;
 	if (ia_valid & ATTR_GID)
 		inode->i_gid = attr->ia_gid;
-	if (ia_valid & ATTR_SIZE)
+	if (ia_valid & ATTR_SIZE) {
 		inode->i_size = attr->ia_size;
+		vmtruncate(inode, attr->ia_size);
+	}
 	if (ia_valid & ATTR_ATIME)
 		inode->i_atime = attr->ia_atime;
 	if (ia_valid & ATTR_MTIME)

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