staging: lustre: remove LPX64 define
[deliverable/linux.git] / drivers / staging / lustre / lustre / ldlm / ldlm_resource.c
index e5171da18cfa046cb6303ed51f87a10b675d8e29..ff40707e12ae6d3f919b2cfb53b83c5035834923 100644 (file)
  */
 
 #define DEBUG_SUBSYSTEM S_LDLM
-# include <lustre_dlm.h>
-
-#include <lustre_fid.h>
-#include <obd_class.h>
+#include "../include/lustre_dlm.h"
+#include "../include/lustre_fid.h"
+#include "../include/obd_class.h"
 #include "ldlm_internal.h"
 
 struct kmem_cache *ldlm_resource_slab, *ldlm_lock_slab;
@@ -194,9 +193,10 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer,
                                      size_t count, loff_t *off)
 {
        struct ldlm_namespace *ns = ((struct seq_file *)file->private_data)->private;
-       char dummy[MAX_STRING_SIZE + 1], *end;
+       char dummy[MAX_STRING_SIZE + 1];
        unsigned long tmp;
        int lru_resize;
+       int err;
 
        dummy[MAX_STRING_SIZE] = '\0';
        if (copy_from_user(dummy, buffer, MAX_STRING_SIZE))
@@ -228,8 +228,8 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer,
                return count;
        }
 
-       tmp = simple_strtoul(dummy, &end, 0);
-       if (dummy == end) {
+       err = kstrtoul(dummy, 10, &tmp);
+       if (err != 0) {
                CERROR("invalid value written\n");
                return -EINVAL;
        }
@@ -1133,9 +1133,9 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent,
                OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CREATE_RESOURCE, 2);
                rc = ns->ns_lvbo->lvbo_init(res);
                if (rc < 0) {
-                       CERROR("%s: lvbo_init failed for resource "LPX64":"
-                              LPX64": rc = %d\n", ns->ns_obd->obd_name,
-                              name->name[0], name->name[1], rc);
+                       CERROR("%s: lvbo_init failed for resource %#llx:%#llx: rc = %d\n",
+                              ns->ns_obd->obd_name, name->name[0],
+                              name->name[1], rc);
                        if (res->lr_lvb_data) {
                                OBD_FREE(res->lr_lvb_data, res->lr_lvb_len);
                                res->lr_lvb_data = NULL;
@@ -1369,7 +1369,7 @@ void ldlm_namespace_dump(int level, struct ldlm_namespace *ns)
               ldlm_ns_name(ns), atomic_read(&ns->ns_bref),
               ns_is_client(ns) ? "client" : "server");
 
-       if (cfs_time_before(cfs_time_current(), ns->ns_next_dump))
+       if (time_before(cfs_time_current(), ns->ns_next_dump))
                return;
 
        cfs_hash_for_each_nolock(ns->ns_rs_hash,
This page took 0.029483 seconds and 5 git commands to generate.