All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vegard Nossum <vegard.nossum@oracle.com>
To: "Theodore Ts'o" <tytso@mit.edu>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: don't leave i_crtime.tv_sec uninitialized
Date: Mon, 17 Feb 2014 11:31:15 +0100	[thread overview]
Message-ID: <5301E4F3.8050104@oracle.com> (raw)
In-Reply-To: <1392597082-7483-1-git-send-email-tytso@mit.edu>

On 02/17/2014 01:31 AM, Theodore Ts'o wrote:
> If the i_crtime field is not present in the inode, don't leave the
> field uninitialized.
>
> Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> ---
>   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);	       \
>

This fixes everything for me, thanks!


Vegard

      reply	other threads:[~2014-02-17 10:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17  0:31 [PATCH] ext4: don't leave i_crtime.tv_sec uninitialized Theodore Ts'o
2014-02-17 10:31 ` Vegard Nossum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5301E4F3.8050104@oracle.com \
    --to=vegard.nossum@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.