Updated from Linux LTS 3.10.25 to 3.10.26
This commit is contained in:
@@ -414,6 +414,9 @@ static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc,
|
||||
{
|
||||
struct ceph_mds_session *s;
|
||||
|
||||
if (mds >= mdsc->mdsmap->m_max_mds)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
s = kzalloc(sizeof(*s), GFP_NOFS);
|
||||
if (!s)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
@@ -639,6 +642,8 @@ static void __unregister_request(struct ceph_mds_client *mdsc,
|
||||
req->r_unsafe_dir = NULL;
|
||||
}
|
||||
|
||||
complete_all(&req->r_safe_completion);
|
||||
|
||||
ceph_mdsc_put_request(req);
|
||||
}
|
||||
|
||||
@@ -1840,8 +1845,11 @@ static int __do_request(struct ceph_mds_client *mdsc,
|
||||
int mds = -1;
|
||||
int err = -EAGAIN;
|
||||
|
||||
if (req->r_err || req->r_got_result)
|
||||
if (req->r_err || req->r_got_result) {
|
||||
if (req->r_aborted)
|
||||
__unregister_request(mdsc, req);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (req->r_timeout &&
|
||||
time_after_eq(jiffies, req->r_started + req->r_timeout)) {
|
||||
@@ -2151,7 +2159,6 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
|
||||
if (head->safe) {
|
||||
req->r_got_safe = true;
|
||||
__unregister_request(mdsc, req);
|
||||
complete_all(&req->r_safe_completion);
|
||||
|
||||
if (req->r_got_unsafe) {
|
||||
/*
|
||||
@@ -3040,8 +3047,10 @@ int ceph_mdsc_init(struct ceph_fs_client *fsc)
|
||||
fsc->mdsc = mdsc;
|
||||
mutex_init(&mdsc->mutex);
|
||||
mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS);
|
||||
if (mdsc->mdsmap == NULL)
|
||||
if (mdsc->mdsmap == NULL) {
|
||||
kfree(mdsc);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
init_completion(&mdsc->safe_umount_waiters);
|
||||
init_waitqueue_head(&mdsc->session_close_wq);
|
||||
|
||||
Reference in New Issue
Block a user