diff options
author | Theodore Ts'o <tytso@mit.edu> | 2011-07-05 20:02:27 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-07-05 20:02:27 -0400 |
commit | 41e102a4d1be1aed9bdd002e03b4d244b5446036 (patch) | |
tree | 5e09ee5fd777ea78f0b6a9046931619d21cd15f4 /lib | |
parent | 25567a7b0fa98b390fd1ff0d4702b29c23a75bbb (diff) | |
download | e2fsprogs-41e102a4d1be1aed9bdd002e03b4d244b5446036.tar.gz |
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" <tytso@mit.edu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ext2fs/inode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c index a762dbce..829e0322 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; |