diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc/llog_client.c')
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/llog_client.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/llog_client.c b/drivers/staging/lustre/lustre/ptlrpc/llog_client.c index e87702073f1f..a23ac5f9ae96 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/llog_client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/llog_client.c @@ -75,7 +75,8 @@ } while (0) /* This is a callback from the llog_* functions. - * Assumes caller has already pushed us into the kernel context. */ + * Assumes caller has already pushed us into the kernel context. + */ static int llog_client_open(const struct lu_env *env, struct llog_handle *lgh, struct llog_logid *logid, char *name, enum llog_open_param open_param) @@ -93,7 +94,7 @@ static int llog_client_open(const struct lu_env *env, LASSERT(lgh); req = ptlrpc_request_alloc(imp, &RQF_LLOG_ORIGIN_HANDLE_CREATE); - if (req == NULL) { + if (!req) { rc = -ENOMEM; goto out; } @@ -130,7 +131,7 @@ static int llog_client_open(const struct lu_env *env, goto out; body = req_capsule_server_get(&req->rq_pill, &RMF_LLOGD_BODY); - if (body == NULL) { + if (!body) { rc = -EFAULT; goto out; } @@ -158,7 +159,7 @@ static int llog_client_next_block(const struct lu_env *env, req = ptlrpc_request_alloc_pack(imp, &RQF_LLOG_ORIGIN_HANDLE_NEXT_BLOCK, LUSTRE_LOG_VERSION, LLOG_ORIGIN_HANDLE_NEXT_BLOCK); - if (req == NULL) { + if (!req) { rc = -ENOMEM; goto err_exit; } @@ -179,14 +180,14 @@ static int llog_client_next_block(const struct lu_env *env, goto out; body = req_capsule_server_get(&req->rq_pill, &RMF_LLOGD_BODY); - if (body == NULL) { + if (!body) { rc = -EFAULT; goto out; } /* The log records are swabbed as they are processed */ ptr = req_capsule_server_get(&req->rq_pill, &RMF_EADATA); - if (ptr == NULL) { + if (!ptr) { rc = -EFAULT; goto out; } @@ -216,7 +217,7 @@ static int llog_client_prev_block(const struct lu_env *env, req = ptlrpc_request_alloc_pack(imp, &RQF_LLOG_ORIGIN_HANDLE_PREV_BLOCK, LUSTRE_LOG_VERSION, LLOG_ORIGIN_HANDLE_PREV_BLOCK); - if (req == NULL) { + if (!req) { rc = -ENOMEM; goto err_exit; } @@ -236,13 +237,13 @@ static int llog_client_prev_block(const struct lu_env *env, goto out; body = req_capsule_server_get(&req->rq_pill, &RMF_LLOGD_BODY); - if (body == NULL) { + if (!body) { rc = -EFAULT; goto out; } ptr = req_capsule_server_get(&req->rq_pill, &RMF_EADATA); - if (ptr == NULL) { + if (!ptr) { rc = -EFAULT; goto out; } @@ -269,7 +270,7 @@ static int llog_client_read_header(const struct lu_env *env, req = ptlrpc_request_alloc_pack(imp, &RQF_LLOG_ORIGIN_HANDLE_READ_HEADER, LUSTRE_LOG_VERSION, LLOG_ORIGIN_HANDLE_READ_HEADER); - if (req == NULL) { + if (!req) { rc = -ENOMEM; goto err_exit; } @@ -285,7 +286,7 @@ static int llog_client_read_header(const struct lu_env *env, goto out; hdr = req_capsule_server_get(&req->rq_pill, &RMF_LLOG_LOG_HDR); - if (hdr == NULL) { + if (!hdr) { rc = -EFAULT; goto out; } @@ -316,8 +317,9 @@ static int llog_client_close(const struct lu_env *env, struct llog_handle *handle) { /* this doesn't call LLOG_ORIGIN_HANDLE_CLOSE because - the servers all close the file at the end of every - other LLOG_ RPC. */ + * the servers all close the file at the end of every + * other LLOG_ RPC. + */ return 0; } |