Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754399AbdGUNZP (ORCPT ); Fri, 21 Jul 2017 09:25:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56116 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754027AbdGUNZL (ORCPT ); Fri, 21 Jul 2017 09:25:11 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 50740C01BD56 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=rpeterso@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 50740C01BD56 Date: Fri, 21 Jul 2017 09:25:07 -0400 (EDT) From: Bob Peterson To: Wang Xibo Cc: swhiteho@redhat.com, cluster-devel@redhat.com, linux-kernel@vger.kernel.org, Xiao Likun Message-ID: <906389525.33459506.1500643507891.JavaMail.zimbra@redhat.com> In-Reply-To: <1500661648-3650-1-git-send-email-wang.xibo@zte.com.cn> References: <1500661648-3650-1-git-send-email-wang.xibo@zte.com.cn> Subject: Re: [PATCH] GFS2: fix code parameter error in inode_go_lock MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.64.2, 10.4.195.22] Thread-Topic: GFS2: fix code parameter error in inode_go_lock Thread-Index: 2udq3vqJtEeWl6SFvkG3cdlsOXRqNA== X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 21 Jul 2017 13:25:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1311 Lines: 39 ----- Original Message ----- | In inode_go_lock() function, the parameter order of list_add() is error. | According to the define of list_add(), the first parameter is new entry | and the second is the list head, so ip->i_trunc_list should be the | first parameter and the sdp->sd_trunc_list should be second. | | Signed-off-by: Wang Xibo | Signed-off-by: Xiao Likun | --- | fs/gfs2/glops.c | 2 +- | 1 file changed, 1 insertion(+), 1 deletion(-) | | diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c | index 5e69636..28c203a 100644 | --- a/fs/gfs2/glops.c | +++ b/fs/gfs2/glops.c | @@ -470,7 +470,7 @@ static int inode_go_lock(struct gfs2_holder *gh) | (gh->gh_state == LM_ST_EXCLUSIVE)) { | spin_lock(&sdp->sd_trunc_lock); | if (list_empty(&ip->i_trunc_list)) | - list_add(&sdp->sd_trunc_list, &ip->i_trunc_list); | + list_add(&ip->i_trunc_list, &sdp->sd_trunc_list); | spin_unlock(&sdp->sd_trunc_lock); | wake_up(&sdp->sd_quota_wait); | return 1; | -- | 1.8.3.1 | | | Hi, Good catch! This is now applied to the for-next branch of the linux-gfs2 tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=e7cb550d79fba5876616ed33ccafafc4e2bd7e2e Regards, Bob Peterson Red Hat File Systems