mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Theodore Ts'o" <tytso@mit.edu>, Jan Kara <jack@suse.com>,
	y2038@lists.linaro.org, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] jbd2: make journal y2038 safe
Date: Sun, 19 Jun 2016 17:53:47 +0200	[thread overview]
Message-ID: <20160619155347.GB2734@quack2.suse.cz> (raw)
In-Reply-To: <20160617153916.444842-1-arnd@arndb.de>

On Fri 17-06-16 17:39:00, Arnd Bergmann wrote:
> The jbd2 journal stores the commit time in 64-bit seconds and 32-bit
> nanoseconds, which avoids an overflow in 2038, but it gets the numbers
> from current_kernel_time(), which uses 'long' seconds on 32-bit
> architectures.
> 
> This simply changes the code to call current_kernel_time64() so
> we use 64-bit seconds consistently.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

The patch looks good. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/jbd2/commit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
> index 8f7d1339c973..5bb565f9989c 100644
> --- a/fs/jbd2/commit.c
> +++ b/fs/jbd2/commit.c
> @@ -124,7 +124,7 @@ static int journal_submit_commit_record(journal_t *journal,
>  	struct commit_header *tmp;
>  	struct buffer_head *bh;
>  	int ret;
> -	struct timespec now = current_kernel_time();
> +	struct timespec64 now = current_kernel_time64();
>  
>  	*cbh = NULL;
>  
> -- 
> 2.9.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2016-06-19 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17 15:39 Arnd Bergmann
2016-06-19 15:53 ` Jan Kara [this message]
2016-06-30 15:49   ` Theodore Ts'o

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=20160619155347.GB2734@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=arnd@arndb.de \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=y2038@lists.linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®