Whamcloud - gitweb
It would be nice to properly type obd_enqueue() to avoid future bugs of this
authorpschwan <pschwan>
Thu, 8 Aug 2002 11:53:15 +0000 (11:53 +0000)
committerpschwan <pschwan>
Thu, 8 Aug 2002 11:53:15 +0000 (11:53 +0000)
nature, but the header dependency problem is tricky.

lustre/llite/file.c

index caea04b..a26825f 100644 (file)
@@ -222,12 +222,13 @@ static void ll_update_atime(struct inode *inode)
         ll_inode_setattr(inode, &attr, 0);
 }
 
-static int ll_lock_callback(struct lustre_handle *lockh,
+static int ll_lock_callback(struct ldlm_lock *lock,
                             struct ldlm_lock_desc *new,
-                            void *data, __u32 data_len,
-                            struct ptlrpc_request **reqp)
+                            void *data, __u32 data_len)
 {
         struct inode *inode = data;
+        struct lustre_handle lockh;
+        int rc;
         ENTRY;
 
         if (data_len != sizeof(struct inode))
@@ -241,8 +242,10 @@ static int ll_lock_callback(struct lustre_handle *lockh,
         invalidate_inode_pages(inode);
         up(&inode->i_sem);
 
-        if (ldlm_cli_cancel(lockh) < 0)
-                LBUG();
+        ldlm_lock2handle(lock, &lockh);
+        rc = ldlm_cli_cancel(&lockh);
+        if (rc != ELDLM_OK)
+                CERROR("ldlm_cli_cancel failed: %d\n", rc);
         RETURN(0);
 }