@@ -112,6 +112,9 @@ u32 req_capsule_fmt_size(u32 magic, const struct req_format *fmt,
int req_capsule_has_field(const struct req_capsule *pill,
const struct req_msg_field *field,
enum req_location loc);
+int req_capsule_field_present(const struct req_capsule *pill,
+ const struct req_msg_field *field,
+ enum req_location loc);
void req_capsule_shrink(struct req_capsule *pill,
const struct req_msg_field *field,
u32 newlen, enum req_location loc);
@@ -459,8 +459,8 @@ void ll_dom_finish_open(struct inode *inode, struct ptlrpc_request *req,
if (!obj)
return;
- if (!req_capsule_has_field(&req->rq_pill, &RMF_NIOBUF_INLINE,
- RCL_SERVER))
+ if (!req_capsule_field_present(&req->rq_pill, &RMF_NIOBUF_INLINE,
+ RCL_SERVER))
return;
rnb = req_capsule_server_get(&req->rq_pill, &RMF_NIOBUF_INLINE);
@@ -2268,9 +2268,9 @@ int req_capsule_has_field(const struct req_capsule *pill,
* Returns a non-zero value if the given @field is present in the given
* @pill's PTLRPC request or reply (@loc), else it returns 0.
*/
-static int req_capsule_field_present(const struct req_capsule *pill,
- const struct req_msg_field *field,
- enum req_location loc)
+int req_capsule_field_present(const struct req_capsule *pill,
+ const struct req_msg_field *field,
+ enum req_location loc)
{
u32 offset;
@@ -2280,6 +2280,7 @@ static int req_capsule_field_present(const struct req_capsule *pill,
offset = __req_capsule_offset(pill, field, loc);
return lustre_msg_bufcount(__req_msg(pill, loc)) > offset;
}
+EXPORT_SYMBOL(req_capsule_field_present);
/**
* This function shrinks the size of the _buffer_ of the @pill's PTLRPC