Message ID | 1633974049-26490-11-git-send-email-jsimmons@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | lustre: sync to OpenSFS Oct 11, 2021 | expand |
diff --git a/fs/lustre/osc/osc_request.c b/fs/lustre/osc/osc_request.c index def2ee7..e5b7453 100644 --- a/fs/lustre/osc/osc_request.c +++ b/fs/lustre/osc/osc_request.c @@ -1567,6 +1567,12 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli, !imp_connect_shortio(cli->cl_import)) short_io_size = 0; + /* If this is an empty RPC to old server, just ignore it */ + if (!short_io_size && !pga[0]->pg) { + ptlrpc_request_free(req); + return -ENODATA; + } + req_capsule_set_size(pill, &RMF_SHORT_IO, RCL_CLIENT, opc == OST_READ ? 0 : short_io_size); if (opc == OST_READ)