Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752457AbbFQCRZ (ORCPT ); Tue, 16 Jun 2015 22:17:25 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:59019 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750891AbbFQCRS (ORCPT ); Tue, 16 Jun 2015 22:17:18 -0400 Message-ID: <5580D81F.3090308@suse.com> Date: Wed, 17 Jun 2015 10:14:55 +0800 From: Guoqing Jiang User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: David Teigland CC: Bob Peterson , ccaulfie@redhat.com, cluster-devel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [Cluster-devel] [PATCH] dlm: remove unnecessary error check References: <1433843172-8953-1-git-send-email-gqjiang@suse.com> <1545280635.13245793.1433851749238.JavaMail.zimbra@redhat.com> <5577A36D.5010908@suse.com> <70321158.13952725.1433904643714.JavaMail.zimbra@redhat.com> <5577AAB4.20700@suse.com> <20150610152438.GB333@redhat.com> <55795930.1030608@suse.com> <20150611161843.GA20918@redhat.com> In-Reply-To: <20150611161843.GA20918@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1234 Lines: 39 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/