Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-1346 libcfs: replace cfs_ memory wrappers
[fs/lustre-release.git]
/
libcfs
/
libcfs
/
libcfs_lock.c
diff --git
a/libcfs/libcfs/libcfs_lock.c
b/libcfs/libcfs/libcfs_lock.c
index
a587e95
..
355e47f
100644
(file)
--- a/
libcfs/libcfs/libcfs_lock.c
+++ b/
libcfs/libcfs/libcfs_lock.c
@@
-21,7
+21,7
@@
* GPL HEADER END
*/
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* GPL HEADER END
*/
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 201
1, 2012, Whamcloud, Inc
.
+ * Copyright (c) 201
2, Intel Corporation
.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-62,7
+62,7
@@
struct cfs_percpt_lock *
cfs_percpt_lock_alloc(struct cfs_cpt_table *cptab)
{
struct cfs_percpt_lock *pcl;
cfs_percpt_lock_alloc(struct cfs_cpt_table *cptab)
{
struct cfs_percpt_lock *pcl;
-
cfs_spinlock_t
*lock;
+
spinlock_t
*lock;
int i;
/* NB: cptab can be NULL, pcl will be for HW CPUs on that case */
int i;
/* NB: cptab can be NULL, pcl will be for HW CPUs on that case */
@@
-78,7
+78,7
@@
cfs_percpt_lock_alloc(struct cfs_cpt_table *cptab)
}
cfs_percpt_for_each(lock, i, pcl->pcl_locks)
}
cfs_percpt_for_each(lock, i, pcl->pcl_locks)
-
cfs_
spin_lock_init(lock);
+ spin_lock_init(lock);
return pcl;
}
return pcl;
}
@@
-109,13
+109,13
@@
cfs_percpt_lock(struct cfs_percpt_lock *pcl, int index)
}
if (likely(index != CFS_PERCPT_LOCK_EX)) {
}
if (likely(index != CFS_PERCPT_LOCK_EX)) {
-
cfs_
spin_lock(pcl->pcl_locks[index]);
+ spin_lock(pcl->pcl_locks[index]);
return;
}
/* exclusive lock request */
for (i = 0; i < ncpt; i++) {
return;
}
/* exclusive lock request */
for (i = 0; i < ncpt; i++) {
-
cfs_
spin_lock(pcl->pcl_locks[i]);
+ spin_lock(pcl->pcl_locks[i]);
if (i == 0) {
LASSERT(!pcl->pcl_locked);
/* nobody should take private lock after this
if (i == 0) {
LASSERT(!pcl->pcl_locked);
/* nobody should take private lock after this
@@
-136,7
+136,7
@@
cfs_percpt_unlock(struct cfs_percpt_lock *pcl, int index)
index = ncpt == 1 ? 0 : index;
if (likely(index != CFS_PERCPT_LOCK_EX)) {
index = ncpt == 1 ? 0 : index;
if (likely(index != CFS_PERCPT_LOCK_EX)) {
-
cfs_
spin_unlock(pcl->pcl_locks[index]);
+ spin_unlock(pcl->pcl_locks[index]);
return;
}
return;
}
@@
-145,7
+145,7
@@
cfs_percpt_unlock(struct cfs_percpt_lock *pcl, int index)
LASSERT(pcl->pcl_locked);
pcl->pcl_locked = 0;
}
LASSERT(pcl->pcl_locked);
pcl->pcl_locked = 0;
}
-
cfs_
spin_unlock(pcl->pcl_locks[i]);
+ spin_unlock(pcl->pcl_locks[i]);
}
}
CFS_EXPORT_SYMBOL(cfs_percpt_unlock);
}
}
CFS_EXPORT_SYMBOL(cfs_percpt_unlock);