diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2009-11-08 08:27:03 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 20:24:53 +0100 |
commit | 4be3df28beec5605c77a18aa2a4f987b5648f9ce (patch) | |
tree | 1cd19042637dd5b055489700d3df4f3f9e19f9b4 /fs/sysfs | |
parent | sysfs: Simplify sysfs_chmod_file semantics (diff) | |
download | linux-4be3df28beec5605c77a18aa2a4f987b5648f9ce.tar.xz linux-4be3df28beec5605c77a18aa2a4f987b5648f9ce.zip |
sysfs: Simplify iattr time assignments
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 <tj@kernel.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | 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 000bd9865004..86fb230de432 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; |