Whamcloud - gitweb
b=17167 libcfs: ensure all libcfs exported symbols to have cfs_ prefix
[fs/lustre-release.git] / lustre / ptlrpc / gss / lproc_gss.c
index 489c870..e30c122 100644 (file)
@@ -70,26 +70,26 @@ static struct proc_dir_entry *gss_proc_lk = NULL;
  * statistic of "out-of-sequence-window"
  */
 static struct {
-        spinlock_t      oos_lock;
-        atomic_t        oos_cli_count;       /* client occurrence */
+        cfs_spinlock_t  oos_lock;
+        cfs_atomic_t    oos_cli_count;       /* client occurrence */
         int             oos_cli_behind;      /* client max seqs behind */
-        atomic_t        oos_svc_replay[3];   /* server replay detected */
-        atomic_t        oos_svc_pass[3];     /* server verified ok */
+        cfs_atomic_t    oos_svc_replay[3];   /* server replay detected */
+        cfs_atomic_t    oos_svc_pass[3];     /* server verified ok */
 } gss_stat_oos = {
-        .oos_cli_count  = ATOMIC_INIT(0),
+        .oos_cli_count  = CFS_ATOMIC_INIT(0),
         .oos_cli_behind = 0,
-        .oos_svc_replay = { ATOMIC_INIT(0), },
-        .oos_svc_pass   = { ATOMIC_INIT(0), },
+        .oos_svc_replay = { CFS_ATOMIC_INIT(0), },
+        .oos_svc_pass   = { CFS_ATOMIC_INIT(0), },
 };
 
 void gss_stat_oos_record_cli(int behind)
 {
-        atomic_inc(&gss_stat_oos.oos_cli_count);
+        cfs_atomic_inc(&gss_stat_oos.oos_cli_count);
 
-        spin_lock(&gss_stat_oos.oos_lock);
+        cfs_spin_lock(&gss_stat_oos.oos_lock);
         if (behind > gss_stat_oos.oos_cli_behind)
                 gss_stat_oos.oos_cli_behind = behind;
-        spin_unlock(&gss_stat_oos.oos_lock);
+        cfs_spin_unlock(&gss_stat_oos.oos_lock);
 }
 
 void gss_stat_oos_record_svc(int phase, int replay)
@@ -97,9 +97,9 @@ void gss_stat_oos_record_svc(int phase, int replay)
         LASSERT(phase >= 0 && phase <= 2);
 
         if (replay)
-                atomic_inc(&gss_stat_oos.oos_svc_replay[phase]);
+                cfs_atomic_inc(&gss_stat_oos.oos_svc_replay[phase]);
         else
-                atomic_inc(&gss_stat_oos.oos_svc_pass[phase]);
+                cfs_atomic_inc(&gss_stat_oos.oos_svc_pass[phase]);
 }
 
 static int gss_proc_read_oos(char *page, char **start, off_t off, int count,
@@ -121,12 +121,12 @@ static int gss_proc_read_oos(char *page, char **start, off_t off, int count,
                         "  phase 2:             %d\n",
                         GSS_SEQ_WIN_MAIN,
                         GSS_SEQ_WIN_BACK,
-                        atomic_read(&gss_stat_oos.oos_cli_count),
+                        cfs_atomic_read(&gss_stat_oos.oos_cli_count),
                         gss_stat_oos.oos_cli_behind,
-                        atomic_read(&gss_stat_oos.oos_svc_replay[0]),
-                        atomic_read(&gss_stat_oos.oos_svc_replay[1]),
-                        atomic_read(&gss_stat_oos.oos_svc_replay[2]),
-                        atomic_read(&gss_stat_oos.oos_svc_pass[2]));
+                        cfs_atomic_read(&gss_stat_oos.oos_svc_replay[0]),
+                        cfs_atomic_read(&gss_stat_oos.oos_svc_replay[1]),
+                        cfs_atomic_read(&gss_stat_oos.oos_svc_replay[2]),
+                        cfs_atomic_read(&gss_stat_oos.oos_svc_pass[2]));
 
         return written;
 }
@@ -202,7 +202,7 @@ int gss_init_lproc(void)
 {
         int     rc;
 
-        spin_lock_init(&gss_stat_oos.oos_lock);
+        cfs_spin_lock_init(&gss_stat_oos.oos_lock);
 
         gss_proc_root = lprocfs_register("gss", sptlrpc_proc_root,
                                          gss_lprocfs_vars, NULL);