From ef87df2c7a8f04d31cbf06f0b14b8dd5feafe473 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Sun, 25 Nov 2018 20:51:18 +0200 Subject: RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write_ex The core code needs to compute the udata so we may as well pass it in the uverbs_attr_bundle instead of on the stack. This converts the simple case of write_ex() which already has a core calculation. Also change the write() path to use the attrs for ib_uverbs_init_udata() instead of on the stack. This lets the write to write_ex compatibility path continue to follow the lead of the _ex path. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky --- include/rdma/uverbs_ioctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h index 7bed0bb4211c..5fa8d63aa838 100644 --- a/include/rdma/uverbs_ioctl.h +++ b/include/rdma/uverbs_ioctl.h @@ -375,8 +375,7 @@ struct uapi_definition { const char __user *buf, int in_len, int out_len); int (*func_write_ex)(struct uverbs_attr_bundle *attrs, - struct ib_udata *ucore, - struct ib_udata *uhw); + struct ib_udata *ucore); const struct uapi_definition *chain; const struct uverbs_object_def *chain_obj_tree; size_t needs_fn_offset; @@ -643,6 +642,7 @@ struct uverbs_attr { }; struct uverbs_attr_bundle { + struct ib_udata driver_udata; struct ib_uverbs_file *ufile; DECLARE_BITMAP(attr_present, UVERBS_API_ATTR_BKEY_LEN); struct uverbs_attr attrs[]; -- cgit v1.2.3-59-g8ed1b