Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1937405imm; Thu, 24 May 2018 03:14:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrVTOqJ2vlVAsZnIzz997Q6JYOfmHp1fnPwYb7dMwX/v4bGMSEG5BnzvgsqiAIYA6e/5R2R X-Received: by 2002:a63:794d:: with SMTP id u74-v6mr5325845pgc.328.1527156863664; Thu, 24 May 2018 03:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527156863; cv=none; d=google.com; s=arc-20160816; b=HAnFfKZ4L+IK1z2Lw9S9CzbaMPv5gPMLa4jSmqFEIopBRej8MdPkuUL26v3VPocGQq WWg81N0f82UgP29kgtsHsVUdIkk2dZAz1grJOHD5oZOb+IKNk4fg8arLdKJspCbeA1sd 8HV6Ze6ARllUTaqErMtRw/sk9RwHLcNk4e/EuELOyU00NyyR0zcqlUd+WQ5/6RwpG3/3 z5lhDXQbgQkT+Lk/ARBdqXVJBK1dEISUVO+YrfyyuVq2hZhUM+md87bM+PzoTqHfHtOd I4qOLMW2z+WfHtgPnBL7+Jm+XqhUY/E9NbE9a8vCGBstrCTmwhBYTLIBfSRVCZUNS6Ty 0RJg== 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=y54RMqiM+3ZdQBqHuxMBADug6ClwgNqmeV5udoTOgGA=; b=ds/IxmXN1wqjttVh+4er0jadDW1tLoJsajG6vfgIUM06KwBKcSgl/SmwSzEUd91wvD gIQsWCaoRpdhu5jsqAxjf/alg9cWZQ+yopCpRAWTupJk6h5xf4zndSO3wXVX/Z8NFcFj ldFZ7HkO8RWR2rhneInDagtSBrbEIen8QFul8bk7kz8WSv7D06SI2vsSHgwpxCVXB7EO xfZV0qFSoCHvJeyHQaPPoQImh8zKG+C6UhFo0TFp/gdeeEyHGSuxzxMKXZo34ouE0fJu 3xEGqLGEh6rhkHNrQTCDhGg8BN1FbLmjwTX1CT7pzU6usfj+5GdjCJM/0mfDYA0qjSNP /McQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K6xbg+cn; 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 202-v6si16726523pgg.546.2018.05.24.03.14.08; Thu, 24 May 2018 03:14:23 -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=K6xbg+cn; 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 S1031694AbeEXKMK (ORCPT + 99 others); Thu, 24 May 2018 06:12:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:54454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031525AbeEXKFN (ORCPT ); Thu, 24 May 2018 06:05: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 E367920891; Thu, 24 May 2018 10:05:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156313; bh=+JpgpLHd47267tDeO6OW2GyNZrtSUmINJiHRRw/Gqoc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K6xbg+cn3JPgGtWrEfGaV1Xd8JEn4L4eO+AKvFOXrnj+xympahyij+nRbgKxtNqnL FO9/GXoF5e0tFozHDJhk0+8AVneJm7xv6RvAbzJKt7m0ErWZSdhuXUBxRSbA1y+0fR 7HLggaTI2+pwuF88JM2duuJdgQB2ycHgaEqqlkxM= 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.16 096/161] staging: lustre: lmv: correctly iput lmo_root Date: Thu, 24 May 2018 11:38:41 +0200 Message-Id: <20180524093029.941985000@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@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.16-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 @@ -2695,7 +2695,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