From patchwork Tue Jul 9 16:38:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 2825371 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 30F2B9F968 for ; Tue, 9 Jul 2013 16:39:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 66F8F2018A for ; Tue, 9 Jul 2013 16:39:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 477B020164 for ; Tue, 9 Jul 2013 16:39:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752193Ab3GIQi5 (ORCPT ); Tue, 9 Jul 2013 12:38:57 -0400 Received: from cantor2.suse.de ([195.135.220.15]:50971 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113Ab3GIQi4 (ORCPT ); Tue, 9 Jul 2013 12:38:56 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 16846A51FE for ; Tue, 9 Jul 2013 18:38:56 +0200 (CEST) Received: by ds.suse.cz (Postfix, from userid 10065) id CCE40DAAE8; Tue, 9 Jul 2013 18:38:55 +0200 (CEST) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH] btrfs-progs: use accessor macro for otime Date: Tue, 9 Jul 2013 18:38:55 +0200 Message-Id: <1373387935-30983-1-git-send-email-dsterba@suse.cz> X-Mailer: git-send-email 1.8.2 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The root_item->otime value must be accessed via the macro otherwise the value is incorrect on big endian machines. Signed-off-by: David Sterba --- btrfs-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrfs-list.c b/btrfs-list.c index c3d35de..7f34237 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -1059,7 +1059,7 @@ static int __list_subvol_search(int fd, struct root_lookup *root_lookup) flags = btrfs_root_flags(ri); if(sh.len > sizeof(struct btrfs_root_item_v0)) { - t = ri->otime.sec; + t = btrfs_stack_timespec_sec(&ri->otime); ogen = btrfs_root_otransid(ri); memcpy(uuid, ri->uuid, BTRFS_UUID_SIZE); memcpy(puuid, ri->parent_uuid, BTRFS_UUID_SIZE);