diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-07-30 04:10:44 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-08-28 16:53:26 -0400 |
commit | dadd1105ca9a1e506c678e8e410e9623efdda821 (patch) | |
tree | 949d3c7e461fea1df29650fa7fd2c4da23f605f7 /fs/btrfs/root-tree.c | |
parent | 55e591ffde38e0088b022129e035e18a8d04c7e6 (diff) |
Btrfs: fix some endian bugs handling the root times
"trans->transid" is cpu endian but we want to store the data as little
endian. "item->ctime.nsec" is only 32 bits, not 64.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Diffstat (limited to 'fs/btrfs/root-tree.c')
-rw-r--r-- | fs/btrfs/root-tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index 6bb465cca20f..10d8e4d88071 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c | |||
@@ -544,8 +544,8 @@ void btrfs_update_root_times(struct btrfs_trans_handle *trans, | |||
544 | struct timespec ct = CURRENT_TIME; | 544 | struct timespec ct = CURRENT_TIME; |
545 | 545 | ||
546 | spin_lock(&root->root_times_lock); | 546 | spin_lock(&root->root_times_lock); |
547 | item->ctransid = trans->transid; | 547 | item->ctransid = cpu_to_le64(trans->transid); |
548 | item->ctime.sec = cpu_to_le64(ct.tv_sec); | 548 | item->ctime.sec = cpu_to_le64(ct.tv_sec); |
549 | item->ctime.nsec = cpu_to_le64(ct.tv_nsec); | 549 | item->ctime.nsec = cpu_to_le32(ct.tv_nsec); |
550 | spin_unlock(&root->root_times_lock); | 550 | spin_unlock(&root->root_times_lock); |
551 | } | 551 | } |