From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Deepa Dinamani , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, tytso@mit.edu, viro@zeniv.linux.org.uk, Jan Kara , tglx@linutronix.de, torvalds@linux-foundation.org Subject: Re: [Y2038] [PATCH v2 09/24] fs: udf: Replace CURRENT_TIME with current_time() Date: Wed, 22 Jun 2016 15:54:26 +0200 Message-ID: <8704234.tYHdNQJqxT@wuerfel> In-Reply-To: <1466382443-11063-10-git-send-email-deepa.kernel@gmail.com> References: <1466382443-11063-1-git-send-email-deepa.kernel@gmail.com> <1466382443-11063-10-git-send-email-deepa.kernel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: On Sunday, June 19, 2016 5:27:08 PM CEST Deepa Dinamani wrote: > mutex_lock(&sbi->s_alloc_mutex); > lvidiu->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX; > lvidiu->impIdent.identSuffix[1] = UDF_OS_ID_LINUX; > + ktime_get_real_ts(&ts); > udf_time_to_disk_stamp(&lvid->recordingDateAndTime, > - CURRENT_TIME); > + timespec_trunc(ts, sb->s_time_gran)); > lvid->integrityType = cpu_to_le32(LVID_INTEGRITY_TYPE_OPEN); > > lvid->descTag.descCRC = cpu_to_le16( > I think we don't need the timespec_trunc here, and introducing the call might complicate matters in the future. IMHO timespec_trunc() really only makes sense when assigning into an inode timestamp, whereas udf_time_to_disk_stamp() already truncates the resulting nanoseconds to microseconds. Arnd