patch-2.3.26 linux/fs/ext2/truncate.c
Next file: linux/fs/fat/file.c
Previous file: linux/fs/ext2/inode.c
Back to the patch index
Back to the overall index
- Lines: 10
- Date:
Thu Nov 4 15:35:34 1999
- Orig file:
v2.3.25/linux/fs/ext2/truncate.c
- Orig date:
Mon Nov 1 13:56:27 1999
diff -u --recursive --new-file v2.3.25/linux/fs/ext2/truncate.c linux/fs/ext2/truncate.c
@@ -50,8 +50,7 @@
* there's no need to test for changes during the operation.
*/
#define DIRECT_BLOCK(inode) \
- ((inode->i_size + inode->i_sb->s_blocksize - 1) / \
- inode->i_sb->s_blocksize)
+ ((unsigned long) ((inode->i_size + inode->i_sb->s_blocksize - 1) >> inode->i_sb->s_blocksize_bits))
#define INDIRECT_BLOCK(inode,offset) ((int)DIRECT_BLOCK(inode) - offset)
#define DINDIRECT_BLOCK(inode,offset) \
(INDIRECT_BLOCK(inode,offset) / addr_per_block)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)