diff options
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/addr.c | 8 | ||||
-rw-r--r-- | fs/ceph/file.c | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 3e61fc8bb371..6fee7e0b8931 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1762,6 +1762,10 @@ static int __ceph_pool_perm_get(struct ceph_inode_info *ci, u32 pool) "%llx.00000000", ci->i_vino.ino); rd_req->r_base_oid.name_len = strlen(rd_req->r_base_oid.name); + err = ceph_osdc_alloc_messages(rd_req, GFP_NOFS); + if (err) + goto out_unlock; + wr_req = ceph_osdc_alloc_request(&fsc->client->osdc, NULL, 1, false, GFP_NOFS); if (!wr_req) { @@ -1775,6 +1779,10 @@ static int __ceph_pool_perm_get(struct ceph_inode_info *ci, u32 pool) wr_req->r_base_oloc.pool = pool; wr_req->r_base_oid = rd_req->r_base_oid; + err = ceph_osdc_alloc_messages(wr_req, GFP_NOFS); + if (err) + goto out_unlock; + /* one page should be large enough for STAT data */ pages = ceph_alloc_page_vector(1, GFP_KERNEL); if (IS_ERR(pages)) { diff --git a/fs/ceph/file.c b/fs/ceph/file.c index a79f9269831e..5d46d106bbb7 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -717,6 +717,13 @@ static void ceph_aio_retry_work(struct work_struct *work) req->r_base_oloc = orig_req->r_base_oloc; req->r_base_oid = orig_req->r_base_oid; + ret = ceph_osdc_alloc_messages(req, GFP_NOFS); + if (ret) { + ceph_osdc_put_request(req); + req = orig_req; + goto out; + } + req->r_ops[0] = orig_req->r_ops[0]; osd_req_op_init(req, 1, CEPH_OSD_OP_STARTSYNC, 0); |