diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c')
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index 3e73254..bea44a3 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -302,7 +302,7 @@ ptlrpc_lprocfs_req_history_max_seq_write(struct file *file, const char *buffer, * hose a kernel by allowing the request history to grow too * far. */ bufpages = (svc->srv_buf_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; - if (val > num_physpages/(2 * bufpages)) + if (val > totalram_pages / (2 * bufpages)) return -ERANGE; spin_lock(&svc->srv_lock); @@ -480,7 +480,6 @@ static int ptlrpc_lprocfs_nrs_seq_show(struct seq_file *m, void *n) bool hp = false; int i; int rc = 0; - ENTRY; /** * Serialize NRS core lprocfs operations with policy registration/ @@ -613,7 +612,7 @@ out: mutex_unlock(&nrs_core.nrs_mutex); - RETURN(rc); + return rc; } /** @@ -638,7 +637,6 @@ static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file, const char *buffe char *cmd_copy = NULL; char *token; int rc = 0; - ENTRY; if (count >= LPROCFS_NRS_WR_MAX_CMD) GOTO(out, rc = -EINVAL); @@ -698,7 +696,7 @@ out: if (cmd_copy) OBD_FREE(cmd_copy, LPROCFS_NRS_WR_MAX_CMD); - RETURN(rc < 0 ? rc : count); + return rc < 0 ? rc : count; } LPROC_SEQ_FOPS(ptlrpc_lprocfs_nrs); @@ -1217,13 +1215,12 @@ int lprocfs_wr_ping(struct file *file, const char *buffer, struct obd_device *obd = ((struct seq_file *)file->private_data)->private; struct ptlrpc_request *req; int rc; - ENTRY; LPROCFS_CLIMP_CHECK(obd); req = ptlrpc_prep_ping(obd->u.cli.cl_import); LPROCFS_CLIMP_EXIT(obd); if (req == NULL) - RETURN(-ENOMEM); + return -ENOMEM; req->rq_send_state = LUSTRE_IMP_FULL; @@ -1231,8 +1228,8 @@ int lprocfs_wr_ping(struct file *file, const char *buffer, ptlrpc_req_finished(req); if (rc >= 0) - RETURN(count); - RETURN(rc); + return count; + return rc; } EXPORT_SYMBOL(lprocfs_wr_ping); |