]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fs/ocfs2/dlm/dlmrecovery.c:dlm_request_all_locks(): ret should be int instead of...
authorJoseph Qi <joseph.qi@huawei.com>
Fri, 7 Jun 2013 00:07:23 +0000 (10:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Jun 2013 05:41:57 +0000 (15:41 +1000)
In dlm_request_all_locks, ret is type enum.  But o2net_send_message
returns a type int value.  Then it will never run into the following error
branch.  So we should change the ret type from enum to int.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Acked-by: Sunil Mushran <sunil.mushran@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/dlm/dlmrecovery.c

index ac84e0832859615f2d48787a6ebf37ab4bed6129..9003523af94e330714a420702f183a2ee158df68 100644 (file)
@@ -786,7 +786,7 @@ static int dlm_request_all_locks(struct dlm_ctxt *dlm, u8 request_from,
                                 u8 dead_node)
 {
        struct dlm_lock_request lr;
-       enum dlm_status ret;
+       int ret;
 
        mlog(0, "\n");
 
@@ -799,7 +799,6 @@ static int dlm_request_all_locks(struct dlm_ctxt *dlm, u8 request_from,
        lr.dead_node = dead_node;
 
        // send message
-       ret = DLM_NOLOCKMGR;
        ret = o2net_send_message(DLM_LOCK_REQUEST_MSG, dlm->key,
                                 &lr, sizeof(lr), request_from, NULL);