OSDN Git Service

tcmu: remove commands_lock
authorMike Christie <mchristi@redhat.com>
Tue, 28 Nov 2017 18:40:32 +0000 (12:40 -0600)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 12 Jan 2018 23:07:13 +0000 (15:07 -0800)
commit6fddcb775477bb2213bd76ab62145645eb570f33
tree59c35a54d94bf131d8af543e5740519fcaa46aa9
parent488ebe4c355fdead39dbb3f6a51329c16cbfcc60
tcmu: remove commands_lock

No need for the commands_lock. The cmdr_lock is already held during
idr addition and deletion, so just grab it during traversal.

Note: This also fixes a issue where we should have been using at
least _bh locking in tcmu_handle_completions when taking the commands
lock to prevent the case where tcmu_handle_completions could be
interrupted by a timer softirq while the commands_lock is held.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_user.c