lockdep: add dependency commit

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/queue/locking-lockdep-Consolidate-lock-usage-bit-initializ.patch b/queue/locking-lockdep-Consolidate-lock-usage-bit-initializ.patch
new file mode 100644
index 0000000..a82f509
--- /dev/null
+++ b/queue/locking-lockdep-Consolidate-lock-usage-bit-initializ.patch
@@ -0,0 +1,80 @@
+From 091806515124b20f8cff7927b4b7ff399483b109 Mon Sep 17 00:00:00 2001
+From: Yuyang Du <duyuyang@gmail.com>
+Date: Mon, 6 May 2019 16:19:37 +0800
+Subject: [PATCH] locking/lockdep: Consolidate lock usage bit initialization
+
+commit 091806515124b20f8cff7927b4b7ff399483b109 upstream.
+
+Lock usage bit initialization is consolidated into one function
+mark_usage(). Trivial readability improvement. No functional change.
+
+Signed-off-by: Yuyang Du <duyuyang@gmail.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: bvanassche@acm.org
+Cc: frederic@kernel.org
+Cc: ming.lei@redhat.com
+Cc: will.deacon@arm.com
+Link: https://lkml.kernel.org/r/20190506081939.74287-22-duyuyang@gmail.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+
+diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
+index 63b82921698d..1123e7e6c78d 100644
+--- a/kernel/locking/lockdep.c
++++ b/kernel/locking/lockdep.c
+@@ -3460,8 +3460,12 @@ void trace_softirqs_off(unsigned long ip)
+ 		debug_atomic_inc(redundant_softirqs_off);
+ }
+ 
+-static int mark_irqflags(struct task_struct *curr, struct held_lock *hlock)
++static int
++mark_usage(struct task_struct *curr, struct held_lock *hlock, int check)
+ {
++	if (!check)
++		goto lock_used;
++
+ 	/*
+ 	 * If non-trylock use in a hardirq or softirq context, then
+ 	 * mark the lock as used in these contexts:
+@@ -3505,6 +3509,11 @@ static int mark_irqflags(struct task_struct *curr, struct held_lock *hlock)
+ 		}
+ 	}
+ 
++lock_used:
++	/* mark it as used: */
++	if (!mark_lock(curr, hlock, LOCK_USED))
++		return 0;
++
+ 	return 1;
+ }
+ 
+@@ -3546,8 +3555,8 @@ int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
+ 	return 1;
+ }
+ 
+-static inline int mark_irqflags(struct task_struct *curr,
+-		struct held_lock *hlock)
++static inline int
++mark_usage(struct task_struct *curr, struct held_lock *hlock, int check)
+ {
+ 	return 1;
+ }
+@@ -3833,11 +3842,8 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
+ #endif
+ 	hlock->pin_count = pin_count;
+ 
+-	if (check && !mark_irqflags(curr, hlock))
+-		return 0;
+-
+-	/* mark it as used: */
+-	if (!mark_lock(curr, hlock, LOCK_USED))
++	/* Initialize the lock usage bit */
++	if (!mark_usage(curr, hlock, check))
+ 		return 0;
+ 
+ 	/*
+-- 
+2.27.0
+
diff --git a/queue/series b/queue/series
index 453694d..81d4f21 100644
--- a/queue/series
+++ b/queue/series
@@ -59,6 +59,7 @@
 hwmon-gpio-fan-Check-return-value-from-devm_add_acti.patch
 hwmon-pwm-fan-Check-return-value-from-devm_add_actio.patch
 tipc-fix-missing-indentation-in-source-code.patch
+locking-lockdep-Consolidate-lock-usage-bit-initializ.patch
 locking-lockdep-Move-mark_lock-inside-CONFIG_TRACE_I.patch
 pwm-meson-Fix-the-G12A-AO-clock-parents-order.patch
 i2c-add-newly-exported-functions-to-the-header-too.patch