Whamcloud - gitweb
LU-3409 llite: silence lockdep warning in ll_md_blocking_ast
[fs/lustre-release.git] / lustre / llite / llite_internal.h
index 0d51446..daaa371 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -474,10 +474,6 @@ struct ll_sb_info {
 
         struct lprocfs_stats     *ll_stats; /* lprocfs stats counter */
 
-       /* Used to track "unstable" pages on a client, and maintain a
-        * LRU list of clean pages. An "unstable" page is defined as
-        * any page which is sent to a server as part of a bulk request,
-        * but is uncommitted to stable storage. */
        struct cl_client_cache    ll_cache;
 
         struct lprocfs_stats     *ll_ra_stats;
@@ -1589,13 +1585,14 @@ static inline void __d_lustre_invalidate(struct dentry *dentry)
  * ll_md_blocking_ast), unhash this dentry, and let dcache to reclaim it later;
  * else dput() of the last refcount will unhash this dentry and kill it.
  */
-static inline void d_lustre_invalidate(struct dentry *dentry)
+static inline void d_lustre_invalidate(struct dentry *dentry, int nested)
 {
        CDEBUG(D_DENTRY, "invalidate dentry %.*s (%p) parent %p inode %p "
               "refc %d\n", dentry->d_name.len, dentry->d_name.name, dentry,
               dentry->d_parent, dentry->d_inode, d_refcount(dentry));
 
-       spin_lock(&dentry->d_lock);
+       spin_lock_nested(&dentry->d_lock,
+                        nested ? DENTRY_D_LOCK_NESTED : DENTRY_D_LOCK_NORMAL);
        __d_lustre_invalidate(dentry);
        if (d_refcount(dentry) == 0)
                __d_drop(dentry);