lkml.org 
[lkml]   [2015]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] dlm: remove unnecessary error check
Date
We don't need the redundant logic since send_message always returns 0.

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
---
fs/dlm/lock.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 35502d4..6fc3de9 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -3656,10 +3656,7 @@ static int send_common(struct dlm_rsb *r, struct dlm_lkb *lkb, int mstype)

send_args(r, lkb, ms);

- error = send_message(mh, ms);
- if (error)
- goto fail;
- return 0;
+ return send_message(mh, ms);

fail:
remove_from_waiters(lkb, msg_reply_type(mstype));
@@ -3763,10 +3760,7 @@ static int send_lookup(struct dlm_rsb *r, struct dlm_lkb *lkb)

send_args(r, lkb, ms);

- error = send_message(mh, ms);
- if (error)
- goto fail;
- return 0;
+ return send_message(mh, ms);

fail:
remove_from_waiters(lkb, DLM_MSG_LOOKUP_REPLY);
--
1.7.12.4


\
 
 \ /
  Last update: 2015-06-09 12:01    [W:0.070 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site