Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5265a0c authored by Andy Adamson's avatar Andy Adamson Committed by Trond Myklebust
Browse files

NFSv4.1 fix page number calculation bug for filelayout decode buffers

parent 9526b2b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -699,7 +699,7 @@ get_device_info(struct inode *inode, struct nfs4_deviceid *dev_id, gfp_t gfp_fla
	 * GETDEVICEINFO's maxcount
	 */
	max_resp_sz = server->nfs_client->cl_session->fc_attrs.max_resp_sz;
	max_pages = max_resp_sz >> PAGE_SHIFT;
	max_pages = nfs_page_array_len(0, max_resp_sz);
	dprintk("%s inode %p max_resp_sz %u max_pages %d\n",
		__func__, inode, max_resp_sz, max_pages);

+1 −1
Original line number Diff line number Diff line
@@ -587,7 +587,7 @@ send_layoutget(struct pnfs_layout_hdr *lo,

	/* allocate pages for xdr post processing */
	max_resp_sz = server->nfs_client->cl_session->fc_attrs.max_resp_sz;
	max_pages = max_resp_sz >> PAGE_SHIFT;
	max_pages = nfs_page_array_len(0, max_resp_sz);

	pages = kcalloc(max_pages, sizeof(struct page *), gfp_flags);
	if (!pages)