Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934128AbZLKWal (ORCPT ); Fri, 11 Dec 2009 17:30:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762781AbZLKWZ1 (ORCPT ); Fri, 11 Dec 2009 17:25:27 -0500 Received: from kroah.org ([198.145.64.141]:32793 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762724AbZLKWZG (ORCPT ); Fri, 11 Dec 2009 17:25:06 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: "Eric W. Biederman" , "Eric W. Biederman" , Greg Kroah-Hartman Subject: [PATCH 16/27] sysfs: Simplify iattr time assignments Date: Fri, 11 Dec 2009 14:24:38 -0800 Message-Id: <1260570289-6997-16-git-send-email-gregkh@suse.de> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <20091211212642.GA6624@kroah.com> References: <20091211212642.GA6624@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1605 Lines: 45 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 Acked-by: Serge Hallyn Signed-off-by: Eric W. Biederman Signed-off-by: Greg Kroah-Hartman --- 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 000bd98..86fb230 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -104,14 +104,11 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr) if (ia_valid & ATTR_GID) iattrs->ia_gid = iattr->ia_gid; if (ia_valid & ATTR_ATIME) - iattrs->ia_atime = timespec_trunc(iattr->ia_atime, - inode->i_sb->s_time_gran); + iattrs->ia_atime = iattr->ia_atime; if (ia_valid & ATTR_MTIME) - iattrs->ia_mtime = timespec_trunc(iattr->ia_mtime, - inode->i_sb->s_time_gran); + iattrs->ia_mtime = iattr->ia_mtime; if (ia_valid & ATTR_CTIME) - iattrs->ia_ctime = timespec_trunc(iattr->ia_ctime, - inode->i_sb->s_time_gran); + iattrs->ia_ctime = iattr->ia_ctime; if (ia_valid & ATTR_MODE) { umode_t mode = iattr->ia_mode; -- 1.6.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/