mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
Two bug fixes for old issues, both marked for stable.
-----BEGIN PGP SIGNATURE----- iQFHBAABCAAxFiEEydHwtzie9C7TfviiSn/eOAIR84sFAlxu23wTHGlkcnlvbW92 QGdtYWlsLmNvbQAKCRBKf944AhHzi04sB/9/Lm694io6coIW/8mTVjKs9iF7+AkA V11Pu3VHnp8okcNs3iSv6rtbPgLrONP5fg7OC9xAzzsEjA8kitnV7kC0RunzuUiw BnZcE0v5Eh4NB34DW4w4I0JDkEH75zlsw/ar8HDvgxTw9hCgV56n1oic+MkqAuiL 5TwBjuLL5Nl4tA9djcMtHhBy3u+jQXAEDJ9tiKFBhzQOPo73N2IyZyY+Kz3qqygV XLWvpmW6PA9jJt8pUGRCqpahaYAY7+cyzOUJbqdRUpeESVl/2Epr7zJZo9LHQtsE GympS5weYMg6xLoZHQXvLbb77E/SlXkeVyNzBw7LnV6us2PS4tbgSt2J =alOG -----END PGP SIGNATURE----- Merge tag 'ceph-for-5.0-rc8' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Two bug fixes for old issues, both marked for stable" * tag 'ceph-for-5.0-rc8' of git://github.com/ceph/ceph-client: ceph: avoid repeatedly adding inode to mdsc->snap_flush_list libceph: handle an empty authorize reply
This commit is contained in:
commit
8a61716ff2
@ -616,7 +616,8 @@ int __ceph_finish_cap_snap(struct ceph_inode_info *ci,
|
||||
capsnap->size);
|
||||
|
||||
spin_lock(&mdsc->snap_flush_lock);
|
||||
list_add_tail(&ci->i_snap_flush_item, &mdsc->snap_flush_list);
|
||||
if (list_empty(&ci->i_snap_flush_item))
|
||||
list_add_tail(&ci->i_snap_flush_item, &mdsc->snap_flush_list);
|
||||
spin_unlock(&mdsc->snap_flush_lock);
|
||||
return 1; /* caller may want to ceph_flush_snaps */
|
||||
}
|
||||
|
@ -2058,6 +2058,8 @@ static int process_connect(struct ceph_connection *con)
|
||||
dout("process_connect on %p tag %d\n", con, (int)con->in_tag);
|
||||
|
||||
if (con->auth) {
|
||||
int len = le32_to_cpu(con->in_reply.authorizer_len);
|
||||
|
||||
/*
|
||||
* Any connection that defines ->get_authorizer()
|
||||
* should also define ->add_authorizer_challenge() and
|
||||
@ -2067,8 +2069,7 @@ static int process_connect(struct ceph_connection *con)
|
||||
*/
|
||||
if (con->in_reply.tag == CEPH_MSGR_TAG_CHALLENGE_AUTHORIZER) {
|
||||
ret = con->ops->add_authorizer_challenge(
|
||||
con, con->auth->authorizer_reply_buf,
|
||||
le32_to_cpu(con->in_reply.authorizer_len));
|
||||
con, con->auth->authorizer_reply_buf, len);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@ -2078,10 +2079,12 @@ static int process_connect(struct ceph_connection *con)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = con->ops->verify_authorizer_reply(con);
|
||||
if (ret < 0) {
|
||||
con->error_msg = "bad authorize reply";
|
||||
return ret;
|
||||
if (len) {
|
||||
ret = con->ops->verify_authorizer_reply(con);
|
||||
if (ret < 0) {
|
||||
con->error_msg = "bad authorize reply";
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user