staging: lustre: don't use time() or CFS_CURRENT_TIME
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jul 2013 17:11:47 +0000 (10:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jul 2013 17:11:47 +0000 (10:11 -0700)
It's just "CURRENT_TIME", don't redefine a macro for something so simple
as that...

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
drivers/staging/lustre/include/linux/libcfs/linux/kp30.h
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/osc/osc_io.c

index 62ef8a7490023e5c7db62c991dc094cd8282ea70..b033aa499deff2295cddec53adf15a8efdbb209f 100644 (file)
@@ -455,10 +455,6 @@ int         cfs_match_nid(lnet_nid_t nid, struct list_head *list);
 /* logical equivalence */
 #define equi(a, b) (!!(a) == !!(b))
 
-#ifndef CFS_CURRENT_TIME
-# define CFS_CURRENT_TIME time(0)
-#endif
-
 /* --------------------------------------------------------------------
  * Light-weight trace
  * Support for temporary event tracing with minimal Heisenberg effect.
index 5bd09ccf3a3c70e3b974daf31ca7db719ce90bb0..073f4d1f176e3a5b73256d77cb9c4b7c335534f0 100644 (file)
 
 #define CFS_SYSFS_MODULE_PARM  1 /* module parameters accessible via sysfs */
 
-/******************************************************************************/
-
-# define time(a) CURRENT_TIME
-
 /******************************************************************************/
 /* Light-weight trace
  * Support for temporary event tracing with minimal Heisenberg effect. */
index e8bf49fa7bbfe4cbe754ee0996af270dc418e944..890268834510b0fcf0045fe2873c1b09f749ed73 100644 (file)
@@ -1408,17 +1408,17 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr)
 
        /* We mark all of the fields "set" so MDS/OST does not re-set them */
        if (attr->ia_valid & ATTR_CTIME) {
-               attr->ia_ctime = CFS_CURRENT_TIME;
+               attr->ia_ctime = CURRENT_TIME;
                attr->ia_valid |= ATTR_CTIME_SET;
        }
        if (!(attr->ia_valid & ATTR_ATIME_SET) &&
            (attr->ia_valid & ATTR_ATIME)) {
-               attr->ia_atime = CFS_CURRENT_TIME;
+               attr->ia_atime = CURRENT_TIME;
                attr->ia_valid |= ATTR_ATIME_SET;
        }
        if (!(attr->ia_valid & ATTR_MTIME_SET) &&
            (attr->ia_valid & ATTR_MTIME)) {
-               attr->ia_mtime = CFS_CURRENT_TIME;
+               attr->ia_mtime = CURRENT_TIME;
                attr->ia_valid |= ATTR_MTIME_SET;
        }
 
index 70aad1aeec6334fe8bbc7a4f4298a3657fd44a6b..342c46e2c91d360d2a37e98030fa50f2b3318645 100644 (file)
@@ -523,7 +523,7 @@ static int osc_io_read_start(const struct lu_env *env,
                cl_object_attr_lock(obj);
                result = cl_object_attr_get(env, obj, attr);
                if (result == 0) {
-                       attr->cat_atime = LTIME_S(CFS_CURRENT_TIME);
+                       attr->cat_atime = LTIME_S(CURRENT_TIME);
                        result = cl_object_attr_set(env, obj, attr,
                                                    CAT_ATIME);
                }
@@ -547,7 +547,7 @@ static int osc_io_write_start(const struct lu_env *env,
                result = cl_object_attr_get(env, obj, attr);
                if (result == 0) {
                        attr->cat_mtime = attr->cat_ctime =
-                               LTIME_S(CFS_CURRENT_TIME);
+                               LTIME_S(CURRENT_TIME);
                        result = cl_object_attr_set(env, obj, attr,
                                                    CAT_MTIME | CAT_CTIME);
                }