Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4357416pxf; Tue, 30 Mar 2021 06:05:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6w487PcdkJWwZ+xzcB9vxClpnbWWWNujEXmqwTbFcq81xF1UIDDpPj5zGAiJz8fJ4K67r X-Received: by 2002:a17:907:10ce:: with SMTP id rv14mr33893078ejb.56.1617109551701; Tue, 30 Mar 2021 06:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617109551; cv=none; d=google.com; s=arc-20160816; b=TDbprsQxbr8vaQcjmkzhf98ySzdP8YcqUAlcCPcQw8dY+/wSWjXN+FHdkihDhXR1mR F5HHA+DsCJW9Q/eHi5kA1AsI3Kp8hoqMCpawMmo22ALe8cuK/BScm/QunRSnMzReiLiR /k39v4RsjMV14Op//rkC9cASYbh0BUN8C3/d4KBX/Do7S163bYbxmUvof53o6VwjstlV DZvQCgsbG47akxL6Utos4fEeSvcWFjq9PE2WWd4jCe6mr3e8wQDKkQjYem7p/4s4GcPN /3u0qzUNBB4wQuZAYExqQlc6ft8PFWss32ZJkLcGHZ69BYW6L0o/o3I+HwwGB4NP+sd7 oBoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=BPJriUhKKIu7Y61zH56FK5X8efjXJBW2E2Tysvh5sXc=; b=WW2xBnPsrU2z/Hdh6n7/M5JoJ4niMpXAiMnFC1s1RT+IjwpKmVp3vhZkJ8sih+vErT 0pPVMTu7kwFMAR/Urc1Yr1+BCrE4ZH7C9IMN7IYojIeH3d2fPrpWW2CkrZVh3Mv3GEFn LUMF3DY0Vic89PgWlv1ISjLAQhsq27MM97sEszB+eb30lxl9jZX90PMSnBiX0XdDvS8n 22GeoSC5exKKla3rm4dFnb6TAjY7cy/yzwu5Uwh1JF46K1kGg/M0Bg/jI2Hcp1R1mPQW lN2SF3YLy9agV+mvqrankUEQLInEjXxwptT9ppB1DJTx7qIZ+wGlUcYxGwv3RnOVi4bw LvbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nd37si15181209ejc.708.2021.03.30.06.05.27; Tue, 30 Mar 2021 06:05:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232125AbhC3NDl (ORCPT + 99 others); Tue, 30 Mar 2021 09:03:41 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15043 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231922AbhC3NDW (ORCPT ); Tue, 30 Mar 2021 09:03:22 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4F8qLg16nczPmtb; Tue, 30 Mar 2021 21:00:43 +0800 (CST) Received: from huawei.com (10.175.103.91) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Tue, 30 Mar 2021 21:03:15 +0800 From: Yang Yingliang To: , CC: Subject: [PATCH -next] fs: 9p: fix wrong pointer passed to IS_ERR() and PTR_ERR() Date: Tue, 30 Mar 2021 21:06:32 +0800 Message-ID: <20210330130632.1054357-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org IS_ERR() and PTR_ERR() use wrong pointer, it should be writeback_fid, fix it. Fixes: 5bfe97d7382b ("9p: Fix writeback fid incorrectly being attached to dentry") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- fs/9p/vfs_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 649f04f112dc..59c32c9b799f 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -86,8 +86,8 @@ int v9fs_file_open(struct inode *inode, struct file *file) * to work. */ writeback_fid = v9fs_writeback_fid(file_dentry(file)); - if (IS_ERR(fid)) { - err = PTR_ERR(fid); + if (IS_ERR(writeback_fid)) { + err = PTR_ERR(writeback_fid); mutex_unlock(&v9inode->v_mutex); goto out_error; } -- 2.25.1