lkml.org 
[lkml]   [2015]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Cluster-devel] [PATCH] dlm: remove unnecessary error check
Hi David,

David Teigland wrote:
> On Thu, Jun 11, 2015 at 05:47:28PM +0800, Guoqing Jiang wrote:
>
>> Do you consider take the following clean up? If yes, I will send a
>> formal patch, otherwise pls ignore it.
>>
>
> On first glance, the old and new code do not appear to do the same thing,
> so let's leave it as it is.
>
>
>> - to_nodeid = dlm_dir_nodeid(r);
>>
Sorry, seems it is the only different thing, if combines previous change
with below modification, then the behavior is same.

@@ -3644,7 +3644,10 @@ static int send_common(struct dlm_rsb *r, struct
dlm_lkb *lkb, int mstype)
struct dlm_mhandle *mh;
int to_nodeid, error;

- to_nodeid = r->res_nodeid;
+ if (mstype == DLM_MSG_LOOKUP)
+ to_nodeid = dlm_dir_nodeid(r);
+ else
+ to_nodeid = r->res_nodeid;

And for create_message, the second parameter (lkb) is not effective to
create three type msgs (REQUEST/LOOKUP/REMOVE).

Thanks,
Guoqing


\
 
 \ /
  Last update: 2015-06-17 04:41    [W:0.057 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site