Whamcloud - gitweb
b=23428 Fix lustre built with --enable-lu_ref
[fs/lustre-release.git] / lustre / liblustre / namei.c
index cfd7100..797e911 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
 #include <fcntl.h>
 #include <sys/queue.h>
 
-#include <sysio.h>
-#ifdef HAVE_XTIO_H
-#include <xtio.h>
-#endif
-#include <fs.h>
-#include <mount.h>
-#include <inode.h>
-#ifdef HAVE_FILE_H
-#include <file.h>
-#endif
-
-#undef LIST_HEAD
-
 #include "llite_lib.h"
 
 void ll_intent_drop_lock(struct lookup_intent *it)
@@ -108,7 +95,7 @@ void llu_lookup_finish_locks(struct lookup_intent *it, struct pnode *pnode)
 
                 sbi = llu_i2sbi(inode);
                 md_set_lock_data(sbi->ll_md_exp,
-                                 &it->d.lustre.it_lock_handle, inode);
+                                 &it->d.lustre.it_lock_handle, inode, NULL);
         }
 
         /* drop lookup/getattr locks */
@@ -332,7 +319,7 @@ static int lookup_it_finish(struct ptlrpc_request *request, int offset,
                 if (it_disposition(it, DISP_OPEN_CREATE) &&
                     !it_open_error(DISP_OPEN_CREATE, it)) {
                         LASSERT(request);
-                        LASSERT(atomic_read(&request->rq_refcount) > 1);
+                        LASSERT(cfs_atomic_read(&request->rq_refcount) > 1);
                         CDEBUG(D_INODE, "dec a ref of req %p\n", request);
                         ptlrpc_req_finished(request);
                 }