Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2022887imm; Thu, 24 May 2018 04:41:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoc9cq8oCxoYnWdBSc7cF4k6X6Rew5xfjCDl6BGcj/l6SXrfrWph0GYUGgW3MRwYoF4uYZV X-Received: by 2002:a62:965c:: with SMTP id c89-v6mr6917774pfe.37.1527162069808; Thu, 24 May 2018 04:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527162069; cv=none; d=google.com; s=arc-20160816; b=Kd+QwW/45RlJ0ka7xgsIJ7FtszlzuZU1L4HU3xBc1G4q6n70nxVwBMcnO/kqefM1qS 8N47wWZetf1HPlmORvD7+WgT2ELzngCoMjwZoYDs1K6zO+X0sux6k808TmBUEeO8UBTQ 2uES0cGK3qsTSI9d+Kqtg/d65MtfwnlZi3JMIcer18SQQQv0r7oUffrxcw2zZQo8xpRR NCPNp0WVlor9hrAf+dZlnIcs8AcPvzFVZxOdcepvISxaSzO8NXoh83JRbibShyf7++Ci yEUED+kk48AxYCqyfzmOhpnLhwdj/l1r6n3JKNfOHL9Valn7Q/smZjIQydk6kw+z5XfZ GIXw== 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=OEPMPugtYxNBGAeWa+vo93MGGGGuPqvBWBXCnWXp9oA=; b=qhLxW5oogcyiwATZ4km2qWHK354R/zZ7JqUIzLzfHMFQTp86OhuD6b2xeVlbx5O0VZ xTwC+SBM0cGjjuAvK9ZOIR41gbsOzWoc2nV5yLkHnqRdL0Miid32/1CU8yMZyK19yP+F Fg+fZsX1WpfEngMLs5ZK5uZLQfQ/Tsmfy9axNGKdQiOA09/YOUyx7UU4Dh399uPfIL+V SQSYI7gPQy/WzDPJ6Z0e5ncHTMjmIkGqbx3r9JLUS4JOIz923Hmq4+po/VoFPgtVBqy+ RoGlVP4T9ARS9pYiO8EgY94fra4R9jUWSos5NbRjYjjlLeuQoByi+svGq+gCynCmXaOo CXaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=We6fiAAG; 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 c19-v6si273799pls.176.2018.05.24.04.40.55; Thu, 24 May 2018 04:41:09 -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=We6fiAAG; 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 S969142AbeEXLkI (ORCPT + 99 others); Thu, 24 May 2018 07:40:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:35574 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965895AbeEXJs6 (ORCPT ); Thu, 24 May 2018 05:48:58 -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 EF50220870; Thu, 24 May 2018 09:48:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155337; bh=6wcYKV/5GLB5wcru58Zvsqb8XwLMYNmbO2ekunmWAU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=We6fiAAGFfrjanCxRklbfgFAxDhD9jwBrRU0Oe84PK0weDXJ3iGkbzk4F+Ai7b9d/ CqiCMLwRr1Xb9A2Z7zzpZjGkYOE/RIjxdFrfo7+iKtd1ZHjsyng4yjJeVhL542Tkoh 7EgeAUncS68SBFSSFAjWliW2RgxUcPdoH5KUHPNc= 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.9 49/96] staging: lustre: lmv: correctly iput lmo_root Date: Thu, 24 May 2018 11:38:32 +0200 Message-Id: <20180524093608.293560882@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093605.602125311@linuxfoundation.org> References: <20180524093605.602125311@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.9-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 @@ -2928,7 +2928,7 @@ int lmv_unpack_md(struct obd_export *exp 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