vt: selection, fix double lock introduced by a merge

The merge commit cb05c6c82f (Merge 5.6-rc5 into tty-next) introduced a
double lock to set_selection_kernel. vc_sel.lock is locked both in
set_selection_kernel and its callee __set_selection_kernel now.

Remove the latter.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/r/20200316064544.4799-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jiri Slaby 2020-03-16 07:45:44 +01:00 committed by Greg Kroah-Hartman
parent d49e7953f9
commit 5b30dee6cc
1 changed files with 0 additions and 1 deletions

View File

@ -219,7 +219,6 @@ static int __set_selection_kernel(struct tiocl_selection *v, struct tty_struct *
if (ps > pe) /* make vc_sel.start <= vc_sel.end */ if (ps > pe) /* make vc_sel.start <= vc_sel.end */
swap(ps, pe); swap(ps, pe);
mutex_lock(&vc_sel.lock);
if (vc_sel.cons != vc_cons[fg_console].d) { if (vc_sel.cons != vc_cons[fg_console].d) {
clear_selection(); clear_selection();
vc_sel.cons = vc_cons[fg_console].d; vc_sel.cons = vc_cons[fg_console].d;