staging: lustre: ptlrpc: correct use of list_add_tail()

With people starting to test security enabled ptlrpc
a list_del corruption was reported. The reason for
this error was tracked down to wrong arguments to
list_add_tail(). In sptlrpc_gc_add_sec() swap the
arguments to list_add_tail() so that it does what
we meant it to do.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8270
Reviewed-on: http://review.whamcloud.com/20784
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
John L. Hammond 2017-07-26 11:22:24 -04:00 committed by Greg Kroah-Hartman
parent 476f575cf0
commit c4f62ea802
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ void sptlrpc_gc_add_sec(struct ptlrpc_sec *sec)
sec->ps_gc_next = ktime_get_real_seconds() + sec->ps_gc_interval;
spin_lock(&sec_gc_list_lock);
list_add_tail(&sec_gc_list, &sec->ps_gc_list);
list_add_tail(&sec->ps_gc_list, &sec_gc_list);
spin_unlock(&sec_gc_list_lock);
CDEBUG(D_SEC, "added sec %p(%s)\n", sec, sec->ps_policy->sp_name);