Merge remote-tracking branch 'staging/staging-next'
[deliverable/linux.git] / drivers / staging / lustre / lustre / obdclass / lustre_handles.c
index 082f530c527c31f4aa5b9023f976f9d16579a3f4..8faa318bf6b4e7a3c7a6d8b35e6f5323f07f3dc8 100644 (file)
@@ -130,7 +130,7 @@ void class_handle_unhash(struct portals_handle *h)
 }
 EXPORT_SYMBOL(class_handle_unhash);
 
-void *class_handle2object(__u64 cookie)
+void *class_handle2object(__u64 cookie, const void *owner)
 {
        struct handle_bucket *bucket;
        struct portals_handle *h;
@@ -145,7 +145,7 @@ void *class_handle2object(__u64 cookie)
 
        rcu_read_lock();
        list_for_each_entry_rcu(h, &bucket->head, h_link) {
-               if (h->h_cookie != cookie)
+               if (h->h_cookie != cookie || h->h_owner != owner)
                        continue;
 
                spin_lock(&h->h_lock);
@@ -214,7 +214,7 @@ static int cleanup_all_handles(void)
                struct portals_handle *h;
 
                spin_lock(&handle_hash[i].lock);
-               list_for_each_entry_rcu(h, &(handle_hash[i].head), h_link) {
+               list_for_each_entry_rcu(h, &handle_hash[i].head, h_link) {
                        CERROR("force clean handle %#llx addr %p ops %p\n",
                               h->h_cookie, h, h->h_ops);
 
This page took 0.023686 seconds and 5 git commands to generate.