Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-17662 osd-zfs: Support for ZFS 2.2.3
[fs/lustre-release.git]
/
lustre
/
mgc
/
mgc_request.c
diff --git
a/lustre/mgc/mgc_request.c
b/lustre/mgc/mgc_request.c
index
7c2c27d
..
ad194a2
100644
(file)
--- a/
lustre/mgc/mgc_request.c
+++ b/
lustre/mgc/mgc_request.c
@@
-206,23
+206,25
@@
struct config_llog_data *do_config_log_add(struct obd_device *obd,
{
struct config_llog_data *cld;
int rc;
+ int logname_size;
ENTRY;
CDEBUG(D_MGC, "do adding config log %s-%016lx\n", logname,
cfg ? cfg->cfg_instance : 0);
- OBD_ALLOC(cld, sizeof(*cld) + strlen(logname) + 1);
+ logname_size = strlen(logname) + 1;
+ OBD_ALLOC(cld, sizeof(*cld) + logname_size);
if (!cld)
RETURN(ERR_PTR(-ENOMEM));
rc = mgc_logname2resid(logname, &cld->cld_resid, type);
if (rc) {
- OBD_FREE(cld, sizeof(*cld) +
strlen(cld->cld_logname) + 1
);
+ OBD_FREE(cld, sizeof(*cld) +
logname_size
);
RETURN(ERR_PTR(rc));
}
- str
cpy(cld->cld_logname, lognam
e);
+ str
scpy(cld->cld_logname, logname, logname_siz
e);
if (cfg)
cld->cld_cfg = *cfg;
else
@@
-1012,7
+1014,7
@@
static int mgc_enqueue(struct obd_export *exp, enum ldlm_type type,
/* A failed enqueue should still call the mgc_blocking_ast,
* where it will be requeued if needed ("grant failed").
*/
- ptlrpc_req_
finished
(req);
+ ptlrpc_req_
put
(req);
RETURN(rc);
}
@@
-1609,7
+1611,7
@@
again:
out:
if (req) {
- ptlrpc_req_
finished
(req);
+ ptlrpc_req_
put
(req);
req = NULL;
}