patch-2.3.29 linux/fs/udf/truncate.c

Next file: linux/fs/udf/udf_sb.h
Previous file: linux/fs/udf/super.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.28/linux/fs/udf/truncate.c linux/fs/udf/truncate.c
@@ -38,8 +38,7 @@
 	lb_addr neloc = { 0, 0 };
 	int nelen = 0;
 	int blocks = inode->i_sb->s_blocksize / 512;
-	int last_block = (elen + inode->i_sb->s_blocksize - 1) / inode->i_sb->s_blocksize;
-
+	int last_block = (elen + inode->i_sb->s_blocksize - 1) >> inode->i_sb->s_blocksize_bits;
 
 	if (offset)
 	{

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