Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2230837ybi; Thu, 20 Jun 2019 11:15:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwc+7wQlGFuwr0dJc6N3ym8Xikrtzr0ajNiuPQgaEgKFBJ6i4fZgBIwxY3TkXHL+KQYajkK X-Received: by 2002:a17:902:549:: with SMTP id 67mr66772438plf.86.1561054548308; Thu, 20 Jun 2019 11:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561054548; cv=none; d=google.com; s=arc-20160816; b=BWnhBpDkblFZlTsYWz+iv32fkRcJ/9hfXLNuLtQ+kFpxWk68yZv2UY8n1sY1El8U0Y Wu0fLKIz8LdKShleV1Mn9p7LqDeDHlHZxWyrOFEkAIXk0/1jDA59ikY3DPvx/uUiPE0S 8S/xF5AHxkKFT3RVcj3wSxucqj6TMVR6yTC9a9LH6Zs8eEHVUaWL0BoJHmtdmOhuRXKR 9sCuREpymcecQ7COzg1+vjjIkH/7D6SdaGzd2+nLnmGqX7k50tPOv9b72Is0MAdMNgah 7ovn39ie29Pqamf0RAMLwGrabmetoseO8XOmC9wT3sZ/+AP3HMkdmgiYVRBMaUBYAUAJ Rorw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZdojpGLRoPk0Ey6Wny4NVbI80g6UDSIl3dnxTn5Dces=; b=mffxy+PNcXlZTgjSj18cqGjb7e0B9tx4zNpHZXr0Cm3jIMGUAaBRmLJjpNmFkatApK g2udxCw3fdC5VYWmeQ7ZLV7jsnWyqVcywJDRey0VtuoX91f/czeNcdYzbAIuYDIWxTYN PaUHHMTrV7tVt6m12aWios4UYDvc+sw8sWI+HbYxRYODC/OkobEkhLXBsH6Tbuhy4y7m g6eP4IXtG6pNciwZb9hvVqjUKqOEKW8zBUjaon1kABButMM4y9ZYOlfo35egGPq5HaaT 8NND2oMKAhOOA/4zU7nDk3znzAd4R3IyK4rePaH7D0tBcmZS8eG+Akkt2L6TkZSsO/ia 5CQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W1EJ6BIT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l10si170353pgq.226.2019.06.20.11.15.33; Thu, 20 Jun 2019 11:15:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W1EJ6BIT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729418AbfFTSON (ORCPT + 99 others); Thu, 20 Jun 2019 14:14:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:42430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728856AbfFTSOM (ORCPT ); Thu, 20 Jun 2019 14:14:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ADD79205F4; Thu, 20 Jun 2019 18:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561054452; bh=jpoG5OfWr9KUYqixqHKTTx28JxU1Pd3vMM8nuxwZcgc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W1EJ6BITwKHwZ0LnQPY2ap5ipEfy6ER7SoLSOalM75Zk6Kr5jV7rHeonDTvZ6GeNO q18U18yNcFQlYrWlda4Ja76lQdbmqX4X/L+pLOLJJDiKECvmS/51EeNUnqS1KmyAAx stlsVRbRyUoKxU/ucEexeIpuZDptdPVTBT9wBmt0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chengguang Xu , Chao Yu , Gao Xiang , Sasha Levin Subject: [PATCH 5.1 33/98] staging: erofs: set sb->s_root to NULL when failing from __getname() Date: Thu, 20 Jun 2019 19:57:00 +0200 Message-Id: <20190620174350.604609689@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190620174349.443386789@linuxfoundation.org> References: <20190620174349.443386789@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit f2dcb8841e6b155da098edae09125859ef7e853d ] Set sb->s_root to NULL when failing from __getname(), so that we can avoid double dput and unnecessary operations in generic_shutdown_super(). Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/erofs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c index 15c784fba879..c8981662a49b 100644 --- a/drivers/staging/erofs/super.c +++ b/drivers/staging/erofs/super.c @@ -459,6 +459,7 @@ static int erofs_read_super(struct super_block *sb, */ err_devname: dput(sb->s_root); + sb->s_root = NULL; err_iget: #ifdef EROFS_FS_HAS_MANAGED_CACHE iput(sbi->managed_cache); -- 2.20.1