Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198063
b: refs/heads/master
c: 9dd4658
h: refs/heads/master
i:
  198061: 82970d7
  198059: 87a45ab
  198055: 62b4f06
  198047: 85dfe32
v: v3
  • Loading branch information
Sage Weil committed May 17, 2010
1 parent 328cbaf commit 7d8c00b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f48280ee1d0654390cd50ad0c41ea93309e7c91
refs/heads/master: 9dd4658db1be5ca92c2ed2fd7a100d973125d9c5
14 changes: 7 additions & 7 deletions trunk/fs/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,6 @@ static int try_write(struct ceph_connection *con)
dout("try_write start %p state %lu nref %d\n", con, con->state,
atomic_read(&con->nref));

mutex_lock(&con->mutex);
more:
dout("try_write out_kvec_bytes %d\n", con->out_kvec_bytes);

Expand Down Expand Up @@ -1639,7 +1638,6 @@ static int try_write(struct ceph_connection *con)
done:
ret = 0;
out:
mutex_unlock(&con->mutex);
dout("try_write done on %p\n", con);
return ret;
}
Expand All @@ -1651,7 +1649,6 @@ static int try_write(struct ceph_connection *con)
*/
static int try_read(struct ceph_connection *con)
{
struct ceph_messenger *msgr;
int ret = -1;

if (!con->sock)
Expand All @@ -1661,9 +1658,6 @@ static int try_read(struct ceph_connection *con)
return 0;

dout("try_read start on %p\n", con);
msgr = con->msgr;

mutex_lock(&con->mutex);

more:
dout("try_read tag %d in_base_pos %d\n", (int)con->in_tag,
Expand Down Expand Up @@ -1758,7 +1752,6 @@ static int try_read(struct ceph_connection *con)
done:
ret = 0;
out:
mutex_unlock(&con->mutex);
dout("try_read done on %p\n", con);
return ret;

Expand Down Expand Up @@ -1830,6 +1823,8 @@ static void con_work(struct work_struct *work)
dout("con_work %p start, clearing QUEUED\n", con);
clear_bit(QUEUED, &con->state);

mutex_lock(&con->mutex);

if (test_bit(CLOSED, &con->state)) { /* e.g. if we are replaced */
dout("con_work CLOSED\n");
con_close_socket(con);
Expand All @@ -1844,11 +1839,16 @@ static void con_work(struct work_struct *work)
if (test_and_clear_bit(SOCK_CLOSED, &con->state) ||
try_read(con) < 0 ||
try_write(con) < 0) {
mutex_unlock(&con->mutex);
backoff = 1;
ceph_fault(con); /* error/fault path */
goto done_unlocked;
}

done:
mutex_unlock(&con->mutex);

done_unlocked:
clear_bit(BUSY, &con->state);
dout("con->state=%lu\n", con->state);
if (test_bit(QUEUED, &con->state)) {
Expand Down

0 comments on commit 7d8c00b

Please sign in to comment.