mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
fs: dlm: cleanup STOP_IO bitflag set when stop io
There should no difference between setting the CF_IO_STOP flag before restore_callbacks() to do it before or afterwards. The restore_callbacks() will be sure that no callback is executed anymore when the bit wasn't set. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
f8bce79d9d
commit
d41a1a3db4
1 changed files with 4 additions and 8 deletions
|
|
@ -735,19 +735,15 @@ static void stop_connection_io(struct connection *con)
|
|||
if (con->othercon)
|
||||
stop_connection_io(con->othercon);
|
||||
|
||||
spin_lock_bh(&con->writequeue_lock);
|
||||
set_bit(CF_IO_STOP, &con->flags);
|
||||
spin_unlock_bh(&con->writequeue_lock);
|
||||
|
||||
down_write(&con->sock_lock);
|
||||
if (con->sock) {
|
||||
lock_sock(con->sock->sk);
|
||||
restore_callbacks(con->sock->sk);
|
||||
|
||||
spin_lock_bh(&con->writequeue_lock);
|
||||
set_bit(CF_IO_STOP, &con->flags);
|
||||
spin_unlock_bh(&con->writequeue_lock);
|
||||
release_sock(con->sock->sk);
|
||||
} else {
|
||||
spin_lock_bh(&con->writequeue_lock);
|
||||
set_bit(CF_IO_STOP, &con->flags);
|
||||
spin_unlock_bh(&con->writequeue_lock);
|
||||
}
|
||||
up_write(&con->sock_lock);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue