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.41.90.wc4~7 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=24404aa340b274e077b2551fa7bdde5122d3eb43;p=tools%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 a762dbc..829e032 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;