aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/mgc
diff options
context:
space:
mode:
authorJohn L. Hammond <john.hammond@intel.com>2016-02-15 10:25:49 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-20 14:29:23 -0800
commit060c2820d0a73c092668957e6831720b83f44efa (patch)
tree3487275e024b3f04edac611f1dc262c16248b0c4 /drivers/staging/lustre/lustre/mgc
parentstaging: lustre: eliminate obsolete Cray SeaStar support (diff)
downloadlinux-dev-060c2820d0a73c092668957e6831720b83f44efa.tar.xz
linux-dev-060c2820d0a73c092668957e6831720b83f44efa.zip
staging: lustre: remove uses of IS_ERR_VALUE()
Remove most uses of IS_ERR_VALUE(). This macro was often given an int argument coming from PTR_ERR(). This invokes implementation defined behavior since the long value gotten by applying PTR_ERR() to a kernel pointer will usually not be representable as an int. Moreover it may be just plain wrong to do this since the expressions IS_ERR(p) and IS_ERR_VALUE((int) PTR_ERR(p)) are not equivalent for a general pointer p. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3498 Reviewed-on: http://review.whamcloud.com/6759 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/mgc')
-rw-r--r--drivers/staging/lustre/lustre/mgc/mgc_request.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index ab4800c20a95..5aeb42688361 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -711,6 +711,7 @@ static int mgc_cleanup(struct obd_device *obd)
static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
{
struct lprocfs_static_vars lvars = { NULL };
+ struct task_struct *task;
int rc;
ptlrpcd_addref();
@@ -734,10 +735,10 @@ static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
init_waitqueue_head(&rq_waitq);
/* start requeue thread */
- rc = PTR_ERR(kthread_run(mgc_requeue_thread, NULL,
- "ll_cfg_requeue"));
- if (IS_ERR_VALUE(rc)) {
- CERROR("%s: Cannot start requeue thread (%d),no more log updates!\n",
+ task = kthread_run(mgc_requeue_thread, NULL, "ll_cfg_requeue");
+ if (IS_ERR(task)) {
+ rc = PTR_ERR(task);
+ CERROR("%s: cannot start requeue thread: rc = %d; no more log updates\n",
obd->obd_name, rc);
goto err_cleanup;
}