From patchwork Mon Feb 17 00:31:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 320839 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B93C72C00CF for ; Mon, 17 Feb 2014 11:31:51 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752883AbaBQAbf (ORCPT ); Sun, 16 Feb 2014 19:31:35 -0500 Received: from imap.thunk.org ([74.207.234.97]:58719 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752322AbaBQAbf (ORCPT ); Sun, 16 Feb 2014 19:31:35 -0500 Received: from root (helo=closure.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.80) (envelope-from ) id 1WFC7P-00074C-NM; Mon, 17 Feb 2014 00:31:31 +0000 Received: by closure.thunk.org (Postfix, from userid 15806) id 2C890580323; Sun, 16 Feb 2014 19:31:28 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=thunk.org; s=mail; t=1392597088; bh=mVMY5hLotyaujRVNusblORP73iX3HylewcIkgm1M91g=; h=From:To:Cc:Subject:Date:From; b=oYygSlmMFr34I0sTsFkc6AWdryWL6HbASuYwaLPoaYs2vMZpj+b5CiCklOZHYgyTX CHfhwq0o/uR9OXwaHz5eRICB6ND6dWlew6+jZygAQYJQUPmQcXRv8LO6gqrGKgeH3/ E0DorNRSixlAftaeJ712vpGinD4VOdnzKUV8pKtM= From: Theodore Ts'o To: Ext4 Developers List Cc: Vegard Nossum , Theodore Ts'o Subject: [PATCH] ext4: don't leave i_crtime.tv_sec uninitialized Date: Sun, 16 Feb 2014 19:31:22 -0500 Message-Id: <1392597082-7483-1-git-send-email-tytso@mit.edu> X-Mailer: git-send-email 1.9.0 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org If the i_crtime field is not present in the inode, don't leave the field uninitialized. Reported-by: Vegard Nossum Signed-off-by: "Theodore Ts'o" --- fs/ext4/ext4.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index ece5556..d3a534f 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -771,6 +771,8 @@ do { \ if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime)) \ (einode)->xtime.tv_sec = \ (signed)le32_to_cpu((raw_inode)->xtime); \ + else \ + (einode)->xtime.tv_sec = 0; \ if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \ ext4_decode_extra_time(&(einode)->xtime, \ raw_inode->xtime ## _extra); \