patch-2.3.45 linux/fs/smbfs/inode.c

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

diff -u --recursive --new-file v2.3.44/linux/fs/smbfs/inode.c linux/fs/smbfs/inode.c
@@ -489,7 +489,8 @@
 		 */
 		if (attr->ia_size < inode->i_size)
 		{
-			truncate_inode_pages(inode, attr->ia_size);
+			/* must die */
+			truncate_inode_pages(inode->i_mapping, attr->ia_size);
 			inode->i_size = attr->ia_size;
 		}
 		refresh = 1;
@@ -562,6 +563,8 @@
 out:
 	if (refresh)
 		smb_refresh_inode(dentry);
+	if (!error && (attr->ia_valid & ATTR_SIZE))
+		vmtruncate(inode, attr->ia_size);
 	return error;
 }
 

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