Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp258110lqe; Wed, 10 Apr 2024 00:46:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVivJpyxUNb8aBwqA+TbiSlZULG0bsoImWcJCjlYlBkb8K9iB44oj1GzcYNE3waEbY2vSevpTuJmtqHrTJob0RuyMDxiEXvkkVXVs4jSQ== X-Google-Smtp-Source: AGHT+IEmN+yB5QXhodeNBnatAe8UAug9uXYxh26QBDlBvR5t8F1JFzieYUyR1HUcyRn9Jfrw+K+Q X-Received: by 2002:a05:620a:571:b0:78d:67aa:9d66 with SMTP id p17-20020a05620a057100b0078d67aa9d66mr1897394qkp.15.1712735193746; Wed, 10 Apr 2024 00:46:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712735193; cv=pass; d=google.com; s=arc-20160816; b=G7rz/veefbkZUiLnapljmUM/o39dzHfH7afwqsrRivjO/3U0D/wyANpHlqACnahWa2 F7C5DcYkJoGsEmtSt73nS6u9ak1os1ofn7ROpBcYc8VbH6uRaVm/YD261A//wdriTm9c i9w4bzuCjcy48Yr2JKjd/+lk1BbJsk5i+MFshCy3V0ElNtvQIGtkk4Cvj105UCjBAF5j U0DT07fq7+iOuqIwHRv8duBs7+XhRDLIqg70uxXK9OXpW3zw3WJo02qYd1/29v6nnn9L uuKSHuPBRx/MOFLlMDSHRasRyKIrkrcnIMGXg/xcGpp2ZI9zzeR1E7m78OOxbplUy/Rt KLMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=P6KUkTYS0NxhEOYHBhMw/opN1u7P+7j+QwvwbxXl2II=; fh=a84aJ7wGV7i8lW51pGyJvRoT4YsTs6703qz3m4vuOmA=; b=L94fRywWfpDbFUgyJccvIbQZzfoIxURQWCBwKM3K/O+YoZdodCFxiQpj3HTcIpgALp YZOvu4VqWOFT6Pge12Nugr1WEwypUjxg43twSYIZ6t1ka9wNBmxCUBKJ1iL6sE5ZSrjl Vc2pHRvTDoqkdtUFSgYTJGvi2g7dBhuj8CU0K8ll3MWV6+MoHRfB32Znrd2eVzf9/NxO VvR2sKXLjxF9ULhhYuCsl1djJIpX3P+aV9yNuxFyeGtnjfgvCWmlam6J2EngTm/c6Oi2 JzczStDaudybOC1MgBXxtvCzYKD+FVzfyPEvHP+aZWuVTHmqhPMe2GgG8YyX1CA0IUuq IEgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-138091-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138091-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m6-20020a05620a214600b0078d6422fee5si6320235qkm.721.2024.04.10.00.46.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 00:46:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138091-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-138091-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138091-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7A6501C2121A for ; Wed, 10 Apr 2024 07:46:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9FC6813D2A3; Wed, 10 Apr 2024 07:46:26 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A43713A405 for ; Wed, 10 Apr 2024 07:46:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712735186; cv=none; b=tnzJSKrWIGtjdoSX1mefDwpAFxVXzWKSNBO+syFAyG0AnDjOmWwe26M0yITPr7nm451fwzkt9G8IoCPGOYDpk33h8h8aA7jRnVdKzk4IOoz1eReleELi8mPFd91F8ZRuP65DE209ZelkmueW9SSajKTb3xJFveeGRbaZPImxfOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712735186; c=relaxed/simple; bh=INjSlanK9XfjHFkoiXnaNur5yuaYf8vOZO36/sJ9GnA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=M0j7Mjd15s4pNaJR6X37NbtSpZ9NLpsWMvFWKSLe0dpCnG6HHR4/sDjsV17jMya4alEg4oNCPHaHHTs4Adbp8Ame+GEzy9Z5K0g/JnB5qPOyT5eDwjBRuuIqk8flN2W2LYu8R93DBddCnr6g1MjVMoHKute9M869gBfrT8W/9mQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4VDvvj5jXgz29dP9; Wed, 10 Apr 2024 15:43:29 +0800 (CST) Received: from kwepemm600013.china.huawei.com (unknown [7.193.23.68]) by mail.maildlp.com (Postfix) with ESMTPS id 90AFA18001A; Wed, 10 Apr 2024 15:46:21 +0800 (CST) Received: from huawei.com (10.175.104.67) by kwepemm600013.china.huawei.com (7.193.23.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 10 Apr 2024 15:46:19 +0800 From: Zhihao Cheng To: CC: , , Subject: [PATCH 3/9] Revert "ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path" Date: Wed, 10 Apr 2024 15:37:45 +0800 Message-ID: <20240410073751.2522830-4-chengzhihao1@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410073751.2522830-1-chengzhihao1@huawei.com> References: <20240410073751.2522830-1-chengzhihao1@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600013.china.huawei.com (7.193.23.68) This reverts commit 6379b44cdcd67f5f5d986b73953e99700591edfa. Commit 1e022216dcd2 ("ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path") is applied again in commit 6379b44cdcd6 ("ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path"), which changed ubifs_mknod (It won't become a real problem). Just revert it. Signed-off-by: Zhihao Cheng --- fs/ubifs/dir.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index eac0fef801f1..551148de66cd 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -1133,8 +1133,6 @@ static int ubifs_mknod(struct mnt_idmap *idmap, struct inode *dir, dir_ui->ui_size = dir->i_size; mutex_unlock(&dir_ui->ui_mutex); out_inode: - /* Free inode->i_link before inode is marked as bad. */ - fscrypt_free_inode(inode); make_bad_inode(inode); iput(inode); out_fname: -- 2.39.2