]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ocfs2: remove unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 10 Dec 2014 23:42:07 +0000 (15:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:04 +0000 (17:41 -0800)
In commit bb57b57b438e ("ocfs2_dlm: disallow a domain join if node maps
mismatch") we introduced a new earlier NULL check so this one is not
needed.  Also static checkers complain because we dereference it first
and then check for NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/dlm/dlmdomain.c

index 02d315fef432a73c5f9af130c37dd2b0c60b3852..50a59d2337b259f8bb078d76bc2e3cd2692675cb 100644 (file)
@@ -877,7 +877,7 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data,
         * to be put in someone's domain map.
         * Also, explicitly disallow joining at certain troublesome
         * times (ie. during recovery). */
-       if (dlm && dlm->dlm_state != DLM_CTXT_LEAVING) {
+       if (dlm->dlm_state != DLM_CTXT_LEAVING) {
                int bit = query->node_idx;
                spin_lock(&dlm->spinlock);