Don't byte-swap the block number when setting i_block[x], since the
write_inode function will take of byte swapping the inode.
The phys_blk parameter contains an input parameter in the SET_BMAP
case, so it must be passed to ext2fs_bmap2() from the legacy function
ext2fs_bmap().
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
if (block < EXT2_NDIR_BLOCKS) {
if (bmap_flags & BMAP_SET) {
b = *phys_blk;
-#ifdef WORDS_BIGENDIAN
- b = ext2fs_swab32(b);
-#endif
inode_bmap(inode, block) = b;
inode_dirty++;
goto done;
blk_t *phys_blk)
{
errcode_t ret;
- blk64_t ret_blk;
+ blk64_t ret_blk = *phys_blk;
ret = ext2fs_bmap2(fs, ino, inode, block_buf, bmap_flags, block,
0, &ret_blk);