]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ceph: don't set WRITE_PENDING too early
authorAlex Elder <elder@inktank.com>
Wed, 16 May 2012 20:16:38 +0000 (15:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 19:38:05 +0000 (11:38 -0800)
commit59a521ebc05d2bd826d19c4a9a6fb00c313f6a52
tree49c30f119f8a9be076ee63355b9baf63e881e8a2
parent7dd07ab6bdc7634e99747557d6ba342b639b13d9
ceph: don't set WRITE_PENDING too early

(cherry picked from commit e10c758e4031a801ea4d2f8fb39bf14c2658d74b)

prepare_write_connect() prepares a connect message, then sets
WRITE_PENDING on the connection.  Then *after* this, it calls
prepare_connect_authorizer(), which updates the content of the
connection buffer already queued for sending.  It's also possible it
will result in prepare_write_connect() returning -EAGAIN despite the
WRITE_PENDING big getting set.

Fix this by preparing the connect authorizer first, setting the
WRITE_PENDING bit only after that is done.

Partially addresses http://tracker.newdream.net/issues/2424

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ceph/messenger.c