Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d7b88513c504e49d450b0f89f80ba9d451a3c804
Commit:     d7b88513c504e49d450b0f89f80ba9d451a3c804
Parent:     c5d4bb171cab17576779a51d23d313abcb3db102
Author:     Dominique Quatravaux <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:31:15 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:30 2008 -0800

    uml: fix hostfs tv_usec calculations
    
    To convert from tv_nsec to tv_usec, one needs to divide by 1000, not 
multiply.
    
    Signed-off-by: Dominique Quatravaux <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/hostfs/hostfs_user.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c
index 35c1a9f..53fd0a6 100644
--- a/fs/hostfs/hostfs_user.c
+++ b/fs/hostfs/hostfs_user.c
@@ -285,17 +285,17 @@ int set_attr(const char *file, struct hostfs_iattr 
*attrs, int fd)
                        return err;
 
                times[0].tv_sec = atime_ts.tv_sec;
-               times[0].tv_usec = atime_ts.tv_nsec * 1000;
+               times[0].tv_usec = atime_ts.tv_nsec / 1000;
                times[1].tv_sec = mtime_ts.tv_sec;
-               times[1].tv_usec = mtime_ts.tv_nsec * 1000;
+               times[1].tv_usec = mtime_ts.tv_nsec / 1000;
 
                if (attrs->ia_valid & HOSTFS_ATTR_ATIME_SET) {
                        times[0].tv_sec = attrs->ia_atime.tv_sec;
-                       times[0].tv_usec = attrs->ia_atime.tv_nsec * 1000;
+                       times[0].tv_usec = attrs->ia_atime.tv_nsec / 1000;
                }
                if (attrs->ia_valid & HOSTFS_ATTR_MTIME_SET) {
                        times[1].tv_sec = attrs->ia_mtime.tv_sec;
-                       times[1].tv_usec = attrs->ia_mtime.tv_nsec * 1000;
+                       times[1].tv_usec = attrs->ia_mtime.tv_nsec / 1000;
                }
 
                if (fd >= 0) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to