Whamcloud - gitweb
LU-6524 llog: Incorrect use of ERR_PTR 76/14876/3
authorUlka Vaze <ulka.vaze@yahoo.in>
Wed, 20 May 2015 11:06:16 +0000 (16:36 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 10 Jun 2015 02:58:29 +0000 (02:58 +0000)
This issue is raised by smatch as below description
llog_osd_destroy incorrectly tried to use ERR_PTR pointer
Resolution is changed rc value to ENOENT

Incorporated code review comments.
Removed ENOENT of earlier commit and updated ot path.

Signed-off-by: Ulka Vaze <ulka.vaze@yahoo.in>
Change-Id: I010c21763ac7fc3664214eda93ea18e1c2d35de6
Signed-off-by: Ulka Vaze <ulka.vaze@yahoo.in>
Reviewed-on: http://review.whamcloud.com/14876
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/llog_osd.c

index f0e904b..e81fb9e 100644 (file)
@@ -1548,7 +1548,7 @@ out_unlock:
        dt_write_unlock(env, o);
 out_trans:
        dt_trans_stop(env, d, th);
-       if (llog_dir != NULL)
+       if (!(IS_ERR_OR_NULL(llog_dir)))
                lu_object_put(env, &llog_dir->do_lu);
        RETURN(rc);
 }