Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1918955imm; Thu, 24 May 2018 02:56:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp7gccki1to2SVmcRudJ4VyJ9NHYZL/FZlbnMHwgK9iUaMaiWckKW3iRDGukE8q/9jsvFKM X-Received: by 2002:a62:3a1c:: with SMTP id h28-v6mr6518660pfa.209.1527155791746; Thu, 24 May 2018 02:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527155791; cv=none; d=google.com; s=arc-20160816; b=O4PFABvaAd5pjAhox6hOEEiSB9NYNejCVYb2IXJ98V7Kr6iwYQ5+md65Si/MzTd5wr d19yUf3qwrnpwLtneNUqRc+GASp5SauAcnkdfEt+l8FotZBrKYM5Tpp8FtoyHqQ7GjTK nwjgNWfXCj0uIGX445bfbuVR2S8ueB3CratKMatuym9BPMzLfP3oD3fpHqE4GANGCowU LIqSp+wGQctVrnoKoOKDJY+Mw5oVDpFDIp2Qn5MG6WXgRS3E/fz43rXfIyL7R5+VVHQA b3w6YujD6t89RSKaCGYI3xTzUAOzcgQfRElJC9fPHkM6VcZ+9jTzfAIvkPcGRpdkHZWD 8eMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=O3A3XOc2buO3UDT5ca+Yr+X+F7HsPuT6Tk2UBMtMiaw=; b=LEjjbCXl+h2Ol1gLfPW78ko1UIX7Txjf3HCsYN515fOv+RvGJHiQl8EXalZRzz2Pvs qAL+wx7X7FYisaHi/CaTGfdY0aSoJnNdrh6SlzrXfU7fdvnft3LfLmsxW6Lb72xt2BEQ /l/DU9IlhWO4gS4+YeWSxm8/r+S1FajtdMWPqERjMlgLQrcqMbfQcng0YD8u7kbrnpdH MRMkNBsbsaGhKQHxMsCnmkhd4D2fcjRlEDQadd0LTwQ0JBwEDJOaskF4gPN757VTI6Kx hdsJBTbSTp9MinHSwc/3LxXeskODCTOd348l5Ua3SRg24zVRJ8so+i08YN09ZXariv+8 7dSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rcgTB+Ee; 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 c3-v6si20928277pfn.245.2018.05.24.02.56.17; Thu, 24 May 2018 02:56:31 -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=rcgTB+Ee; 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 S968344AbeEXJzT (ORCPT + 99 others); Thu, 24 May 2018 05:55:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:35270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968019AbeEXJzN (ORCPT ); Thu, 24 May 2018 05:55:13 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 43CC820893; Thu, 24 May 2018 09:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155712; bh=c7CULDoXKfsiWWR7QhcpTyZjcC0hRgbEyYCcAh9HmCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rcgTB+Eeeb0pLSU4RnZeaIsSr0QQqNTlzlZm+PjM6PyUUIbV34hKQrV8rrC3TPWSG dAoiwNqPoXOUSl1zIKVZv5viOl4AYFil+9WDRu7pGdoVPxzT7K+pGXvSdF4FM68aDc jw5BaAm8Op9QfFdm4P1+LzIovjqEjqfDmgY9Dlxw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, NeilBrown , James Simmons , Sasha Levin Subject: [PATCH 4.14 090/165] staging: lustre: lmv: correctly iput lmo_root Date: Thu, 24 May 2018 11:38:16 +0200 Message-Id: <20180524093625.670726153@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: NeilBrown [ Upstream commit 17556cdbe6ed70a6a20e597b228628f7f34387f8 ] Commit 8f18c8a48b73 ("staging: lustre: lmv: separate master object with master stripe") changed how lmo_root inodes were managed, particularly when LMV_HASH_FLAG_MIGRATION is not set. Previously lsm_md_oinfo[0].lmo_root was always a borrowed inode reference and didn't need to by iput(). Since the change, that special case only applies when LMV_HASH_FLAG_MIGRATION is set In the upstream (lustre-release) version of this patch [Commit 60e07b972114 ("LU-4690 lod: separate master object with master stripe")] the for loop in the lmv_unpack_md() was changed to count from 0 and to ignore entry 0 if LMV_HASH_FLAG_MIGRATION is set. In the patch that got applied to Linux, that change was missing, so lsm_md_oinfo[0].lmo_root is never iput(). This results in a "VFS: Busy inodes" warning at unmount. Fixes: 8f18c8a48b73 ("staging: lustre: lmv: separate master object with master stripe") Signed-off-by: NeilBrown Reviewed-by: James Simmons Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -2694,7 +2694,7 @@ static int lmv_unpackmd(struct obd_expor if (lsm && !lmm) { int i; - for (i = 1; i < lsm->lsm_md_stripe_count; i++) { + for (i = 0; i < lsm->lsm_md_stripe_count; i++) { /* * For migrating inode, the master stripe and master * object will be the same, so do not need iput, see