diff mbox series

[v2,15/17] kernfs: Mark kernfs_open_node_lock as terminal lock

Message ID 1542653726-5655-16-git-send-email-longman@redhat.com (mailing list archive)
State New, archived
Headers show
Series locking/lockdep: Add a new class of terminal locks | expand

Commit Message

Waiman Long Nov. 19, 2018, 6:55 p.m. UTC
By making kernfs_open_node_lock a terminal spinlock, it reduces the
lockdep overhead when this lock is used.

Signed-off-by: Waiman Long <longman@redhat.com>
---
 fs/kernfs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index dbf5bc2..a86fe22 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -29,7 +29,7 @@ 
  * kernfs_open_file.  kernfs_open_files are chained at
  * kernfs_open_node->files, which is protected by kernfs_open_file_mutex.
  */
-static DEFINE_SPINLOCK(kernfs_open_node_lock);
+static DEFINE_TERMINAL_SPINLOCK(kernfs_open_node_lock);
 static DEFINE_MUTEX(kernfs_open_file_mutex);
 
 struct kernfs_open_node {