Whamcloud - gitweb
LU-3974 client: use standard dentry locking function
[fs/lustre-release.git] / lustre / include / linux / lustre_patchless_compat.h
index c948cda..747bd4d 100644 (file)
@@ -91,10 +91,10 @@ truncate_complete_page(struct address_space *mapping, struct page *page)
 #endif /* !HAVE_TRUNCATE_COMPLETE_PAGE */
 
 #ifdef HAVE_DCACHE_LOCK
-#  define dget_dlock(d)                 dget_locked(d)
-#  define d_refcount(d)                 atomic_read(&(d)->d_count)
-#else
-#  define d_refcount(d)                 ((d)->d_count)
+#  define dget_dlock(d)                        dget_locked(d)
+#  define d_count(d)                   atomic_read(&(d)->d_count)
+#elif !defined(HAVE_D_COUNT)
+#  define d_count(d)                   ((d)->d_count)
 #endif /* HAVE_DCACHE_LOCK */
 
 #ifdef ATTR_OPEN