linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: tytso@mit.edu, y2038@lists.linaro.org,
	linux-kernel@vger.kernel.org,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	tglx@linutronix.de, linux-ext4@vger.kernel.org,
	torvalds@linux-foundation.org
Subject: Re: [PATCH v2 06/24] fs: ext4: Use current_time() for inode timestamps
Date: Wed, 22 Jun 2016 15:40:06 +0200	[thread overview]
Message-ID: <14013437.bAvQTZLQL2@wuerfel> (raw)
In-Reply-To: <1466382443-11063-7-git-send-email-deepa.kernel@gmail.com>

On Sunday, June 19, 2016 5:27:05 PM CEST Deepa Dinamani wrote:
> @@ -3727,6 +3727,7 @@ static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
>         };
>         u8 new_file_type;
>         int retval;
> +       struct timespec ctime;
>  
>         if ((ext4_encrypted_inode(old_dir) ||
>              ext4_encrypted_inode(new_dir)) &&
> @@ -3829,8 +3830,9 @@ static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
>          * Like most other Unix systems, set the ctime for inodes on a
>          * rename.
>          */
> -       old.inode->i_ctime = ext4_current_time(old.inode);
> -       new.inode->i_ctime = ext4_current_time(new.inode);
> +       ctime = current_time(old.inode);
> +       old.inode->i_ctime = ctime;
> +       new.inode->i_ctime = ctime;
>         ext4_mark_inode_dirty(handle, old.inode);
>         ext4_mark_inode_dirty(handle, new.inode);
>  

Adding a local variable here looks like it is going to cause us trouble when we
change the return type of current_time() to timespec64.

I'd write this as

	new.inode->i_ctime = old.inode->i_ctime;

instead.

	Arnd
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038

  reply	other threads:[~2016-06-22 13:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20  0:26 [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Deepa Dinamani
2016-06-20  0:27 ` [PATCH v2 06/24] fs: ext4: Use current_time() for inode timestamps Deepa Dinamani
2016-06-22 13:40   ` Arnd Bergmann [this message]
2016-06-24 23:08     ` Deepa Dinamani
     [not found] ` <1466382443-11063-1-git-send-email-deepa.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-20 18:03   ` [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Linus Torvalds
     [not found]     ` <CA+55aFzK2K-7UeQRsWR7ooNHMMbtMFRAF60byR1Gvmbf9XWhbA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-20 18:58       ` Deepa Dinamani
2016-06-21 15:00       ` [Y2038] " Arnd Bergmann
2016-06-22 15:49 ` Arnd Bergmann

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=14013437.bAvQTZLQL2@wuerfel \
    --to=arnd@arndb.de \
    --cc=adilger.kernel@dilger.ca \
    --cc=deepa.kernel@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    --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;
as well as URLs for NNTP newsgroup(s).