Commit c2bb524b authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

tty: Remove __lockfunc annotation from tty lock functions

The tty lock/unlock code does not belong in the special lockfunc section
which is treated specially by stack backtraces.
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c1e33af1
...@@ -304,13 +304,13 @@ void tty_ldisc_deref(struct tty_ldisc *ld) ...@@ -304,13 +304,13 @@ void tty_ldisc_deref(struct tty_ldisc *ld)
EXPORT_SYMBOL_GPL(tty_ldisc_deref); EXPORT_SYMBOL_GPL(tty_ldisc_deref);
static inline int __lockfunc static inline int
__tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout) __tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
{ {
return ldsem_down_write(&tty->ldisc_sem, timeout); return ldsem_down_write(&tty->ldisc_sem, timeout);
} }
static inline int __lockfunc static inline int
__tty_ldisc_lock_nested(struct tty_struct *tty, unsigned long timeout) __tty_ldisc_lock_nested(struct tty_struct *tty, unsigned long timeout)
{ {
return ldsem_down_write_nested(&tty->ldisc_sem, return ldsem_down_write_nested(&tty->ldisc_sem,
...@@ -322,8 +322,7 @@ static inline void __tty_ldisc_unlock(struct tty_struct *tty) ...@@ -322,8 +322,7 @@ static inline void __tty_ldisc_unlock(struct tty_struct *tty)
ldsem_up_write(&tty->ldisc_sem); ldsem_up_write(&tty->ldisc_sem);
} }
static int __lockfunc static int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
{ {
int ret; int ret;
...@@ -340,7 +339,7 @@ static void tty_ldisc_unlock(struct tty_struct *tty) ...@@ -340,7 +339,7 @@ static void tty_ldisc_unlock(struct tty_struct *tty)
__tty_ldisc_unlock(tty); __tty_ldisc_unlock(tty);
} }
static int __lockfunc static int
tty_ldisc_lock_pair_timeout(struct tty_struct *tty, struct tty_struct *tty2, tty_ldisc_lock_pair_timeout(struct tty_struct *tty, struct tty_struct *tty2,
unsigned long timeout) unsigned long timeout)
{ {
...@@ -376,14 +375,13 @@ tty_ldisc_lock_pair_timeout(struct tty_struct *tty, struct tty_struct *tty2, ...@@ -376,14 +375,13 @@ tty_ldisc_lock_pair_timeout(struct tty_struct *tty, struct tty_struct *tty2,
return 0; return 0;
} }
static void __lockfunc static void tty_ldisc_lock_pair(struct tty_struct *tty, struct tty_struct *tty2)
tty_ldisc_lock_pair(struct tty_struct *tty, struct tty_struct *tty2)
{ {
tty_ldisc_lock_pair_timeout(tty, tty2, MAX_SCHEDULE_TIMEOUT); tty_ldisc_lock_pair_timeout(tty, tty2, MAX_SCHEDULE_TIMEOUT);
} }
static void __lockfunc tty_ldisc_unlock_pair(struct tty_struct *tty, static void tty_ldisc_unlock_pair(struct tty_struct *tty,
struct tty_struct *tty2) struct tty_struct *tty2)
{ {
__tty_ldisc_unlock(tty); __tty_ldisc_unlock(tty);
if (tty2) if (tty2)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Getting the big tty mutex. * Getting the big tty mutex.
*/ */
void __lockfunc tty_lock(struct tty_struct *tty) void tty_lock(struct tty_struct *tty)
{ {
if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty)) if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty))
return; return;
...@@ -27,7 +27,7 @@ int tty_lock_interruptible(struct tty_struct *tty) ...@@ -27,7 +27,7 @@ int tty_lock_interruptible(struct tty_struct *tty)
return mutex_lock_interruptible(&tty->legacy_mutex); return mutex_lock_interruptible(&tty->legacy_mutex);
} }
void __lockfunc tty_unlock(struct tty_struct *tty) void tty_unlock(struct tty_struct *tty)
{ {
if (WARN(tty->magic != TTY_MAGIC, "U Bad %p\n", tty)) if (WARN(tty->magic != TTY_MAGIC, "U Bad %p\n", tty))
return; return;
...@@ -36,13 +36,13 @@ void __lockfunc tty_unlock(struct tty_struct *tty) ...@@ -36,13 +36,13 @@ void __lockfunc tty_unlock(struct tty_struct *tty)
} }
EXPORT_SYMBOL(tty_unlock); EXPORT_SYMBOL(tty_unlock);
void __lockfunc tty_lock_slave(struct tty_struct *tty) void tty_lock_slave(struct tty_struct *tty)
{ {
if (tty && tty != tty->link) if (tty && tty != tty->link)
tty_lock(tty); tty_lock(tty);
} }
void __lockfunc tty_unlock_slave(struct tty_struct *tty) void tty_unlock_slave(struct tty_struct *tty)
{ {
if (tty && tty != tty->link) if (tty && tty != tty->link)
tty_unlock(tty); tty_unlock(tty);
......
...@@ -643,11 +643,11 @@ extern long vt_compat_ioctl(struct tty_struct *tty, ...@@ -643,11 +643,11 @@ extern long vt_compat_ioctl(struct tty_struct *tty,
/* tty_mutex.c */ /* tty_mutex.c */
/* functions for preparation of BKL removal */ /* functions for preparation of BKL removal */
extern void __lockfunc tty_lock(struct tty_struct *tty); extern void tty_lock(struct tty_struct *tty);
extern int tty_lock_interruptible(struct tty_struct *tty); extern int tty_lock_interruptible(struct tty_struct *tty);
extern void __lockfunc tty_unlock(struct tty_struct *tty); extern void tty_unlock(struct tty_struct *tty);
extern void __lockfunc tty_lock_slave(struct tty_struct *tty); extern void tty_lock_slave(struct tty_struct *tty);
extern void __lockfunc tty_unlock_slave(struct tty_struct *tty); extern void tty_unlock_slave(struct tty_struct *tty);
extern void tty_set_lock_subclass(struct tty_struct *tty); extern void tty_set_lock_subclass(struct tty_struct *tty);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment