]> git.hungrycats.org Git - linux/commitdiff
[PATCH] reiserfs: fix savelinks on bigendian arches
authorAndrew Morton <akpm@osdl.org>
Thu, 7 Aug 2003 04:13:11 +0000 (21:13 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 7 Aug 2003 04:13:11 +0000 (21:13 -0700)
From: Oleg Drokin <green@namesys.com>

This small patch fixes a savelinks problem on bigendian platforms, where
savelinks were not working at all because of incorrect cpu->disk endianness
conversion.

Savelinks are used on reiserfs to remember "truncate" and "unlink" events
so that if crash happens in the middle of truncate/unlink, we do not endup
with lost or half truncated files.

fs/reiserfs/super.c

index 9f37ffd92761dc567e80a6b666ea38d3f49d540d..64892e35c677b49210d862837387f22b08a91aab 100644 (file)
@@ -298,7 +298,7 @@ void add_save_link (struct reiserfs_transaction_handle * th,
     }
 
     /* body of "save" link */
-    link = cpu_to_le32 (INODE_PKEY (inode)->k_dir_id);
+    link = INODE_PKEY (inode)->k_dir_id;
 
     /* put "save" link inot tree */
     retval = reiserfs_insert_item (th, &path, &key, &ih, (char *)&link);