From: Theodore Ts'o Date: Wed, 6 Jul 2011 00:02:27 +0000 (-0400) Subject: libext2fs: fix 64-bit support in ext2fs_{read,write}_inode_full() X-Git-Tag: v1.42-WIP-0916~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41e102a4d1be1aed9bdd002e03b4d244b5446036;p=thirdparty%2Fe2fsprogs.git libext2fs: fix 64-bit support in ext2fs_{read,write}_inode_full() This fixes a problem where reading or writing inodes located after the 4GB boundary would fail. Signed-off-by: "Theodore Ts'o" --- diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c index a762dbce6..829e03220 100644 --- a/lib/ext2fs/inode.c +++ b/lib/ext2fs/inode.c @@ -522,7 +522,8 @@ errcode_t ext2fs_get_next_inode(ext2_inode_scan scan, ext2_ino_t *ino, errcode_t ext2fs_read_inode_full(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode * inode, int bufsize) { - unsigned long group, block, block_nr, offset; + blk64_t block_nr; + unsigned long group, block, offset; char *ptr; errcode_t retval; int clen, i, inodes_per_block, length; @@ -628,7 +629,8 @@ errcode_t ext2fs_read_inode(ext2_filsys fs, ext2_ino_t ino, errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode * inode, int bufsize) { - unsigned long group, block, block_nr, offset; + blk64_t block_nr; + unsigned long group, block, offset; errcode_t retval = 0; struct ext2_inode_large temp_inode, *w_inode; char *ptr;