From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric W. Biederman" Subject: [PATCH 11/26] sysfs: Simplify iattr assignments Date: Fri, 29 May 2009 13:19:21 -0700 Message-ID: <1243628376-22905-11-git-send-email-ebiederm@xmission.com> References: Cc: , Tejun Heo , Cornelia Huck , , Kay Sievers , Greg KH , "Eric W. Biederman" , "Eric W. Biederman" To: Andrew Morton , Greg Kroah-Hartman Return-path: Received: from out01.mta.xmission.com ([166.70.13.231]:41770 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763329AbZE2UTy (ORCPT ); Fri, 29 May 2009 16:19:54 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: Eric W. Biederman The granularity of sysfs time when we keep it is 1 ns. Which when passed to timestamp_trunc results in a nop. So remove the unnecessary function call making sysfs_setattr slightly easier to read. Acked-by: Tejun Heo Signed-off-by: Eric W. Biederman --- fs/sysfs/inode.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 70ff2a2..5020a1d 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -96,14 +96,11 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr) if (ia_valid & ATTR_GID) sd_iattr->ia_gid = iattr->ia_gid; if (ia_valid & ATTR_ATIME) - sd_iattr->ia_atime = timespec_trunc(iattr->ia_atime, - inode->i_sb->s_time_gran); + sd_iattr->ia_atime = iattr->ia_atime; if (ia_valid & ATTR_MTIME) - sd_iattr->ia_mtime = timespec_trunc(iattr->ia_mtime, - inode->i_sb->s_time_gran); + sd_iattr->ia_mtime = iattr->ia_mtime; if (ia_valid & ATTR_CTIME) - sd_iattr->ia_ctime = timespec_trunc(iattr->ia_ctime, - inode->i_sb->s_time_gran); + sd_iattr->ia_ctime = iattr->ia_ctime; if (ia_valid & ATTR_MODE) sd_iattr->ia_mode = iattr->ia_mode; -- 1.6.3.1.54.g99dd.dirty