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-12142 readahead: limit over reservation
[fs/lustre-release.git]
/
lustre
/
obdclass
/
lustre_handles.c
diff --git
a/lustre/obdclass/lustre_handles.c
b/lustre/obdclass/lustre_handles.c
index
1f93ed5
..
061090a
100644
(file)
--- a/
lustre/obdclass/lustre_handles.c
+++ b/
lustre/obdclass/lustre_handles.c
@@
-88,7
+88,6
@@
void class_handle_hash(struct portals_handle *h, const char *owner)
spin_unlock(&handle_base_lock);
h->h_owner = owner;
spin_unlock(&handle_base_lock);
h->h_owner = owner;
- spin_lock_init(&h->h_lock);
bucket = &handle_hash[h->h_cookie & HANDLE_HASH_MASK];
spin_lock(&bucket->lock);
bucket = &handle_hash[h->h_cookie & HANDLE_HASH_MASK];
spin_lock(&bucket->lock);
@@
-112,13
+111,7
@@
static void class_handle_unhash_nolock(struct portals_handle *h)
CDEBUG(D_INFO, "removing object %p with handle %#llx from hash\n",
h, h->h_cookie);
CDEBUG(D_INFO, "removing object %p with handle %#llx from hash\n",
h, h->h_cookie);
- spin_lock(&h->h_lock);
- if (hlist_unhashed(&h->h_link)) {
- spin_unlock(&h->h_lock);
- return;
- }
hlist_del_init_rcu(&h->h_link);
hlist_del_init_rcu(&h->h_link);
- spin_unlock(&h->h_lock);
}
void class_handle_unhash(struct portals_handle *h)
}
void class_handle_unhash(struct portals_handle *h)
@@
-173,7
+166,7
@@
int class_handle_init(void)
LASSERT(handle_hash == NULL);
LASSERT(handle_hash == NULL);
- OBD_ALLOC_
LARGE(handle_hash, sizeof(*bucket) *
HANDLE_HASH_SIZE);
+ OBD_ALLOC_
PTR_ARRAY_LARGE(handle_hash,
HANDLE_HASH_SIZE);
if (handle_hash == NULL)
return -ENOMEM;
if (handle_hash == NULL)
return -ENOMEM;
@@
-219,7
+212,7
@@
void class_handle_cleanup(void)
count = cleanup_all_handles();
count = cleanup_all_handles();
- OBD_FREE_
LARGE(handle_hash, sizeof(*handle_hash) *
HANDLE_HASH_SIZE);
+ OBD_FREE_
PTR_ARRAY_LARGE(handle_hash,
HANDLE_HASH_SIZE);
handle_hash = NULL;
if (count != 0)
handle_hash = NULL;
if (count != 0)