Commit 22ab9014bfdaf97449759aef946871aabe78bb40

Authored by Joseph Qi
Committed by Linus Torvalds
1 parent 82d627cf1f

fs/ocfs2/dlm/dlmrecovery.c:dlm_request_all_locks(): ret should be int instead of enum

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

fs/ocfs2/dlm/dlmrecovery.c
... ... @@ -786,7 +786,7 @@
786 786 u8 dead_node)
787 787 {
788 788 struct dlm_lock_request lr;
789   - enum dlm_status ret;
  789 + int ret;
790 790  
791 791 mlog(0, "\n");
792 792  
... ... @@ -799,7 +799,6 @@
799 799 lr.dead_node = dead_node;
800 800  
801 801 // send message
802   - ret = DLM_NOLOCKMGR;
803 802 ret = o2net_send_message(DLM_LOCK_REQUEST_MSG, dlm->key,
804 803 &lr, sizeof(lr), request_from, NULL);
805 804