From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5F89A2153DD; Thu, 12 Dec 2024 17:33:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734024802; cv=none; b=mzZqouk4EvPYQV6DSdm31789EEhr0ZEMy0L2OWLif7w+WcsTf/doHLUo43kKUQ8aZxATAau/nUlA9DO01l66VTVdykgZQ1c1VxLZLXMrP3cmKP43crlxSSloDZmRCiy9pVxIMvIfX1rIHKlpbFW4xJK58BnLauN1EUjPnaCNMGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734024802; c=relaxed/simple; bh=IUSdrSOHh0jj4njDf+n7yioFiqtpfUBBKnMLKwh+SJo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pOKYy7TOAoTGJDtAff6O25I12AUjE4hmaphq2uXFR3SaGji5A3fCphWih/VV2r+QudDPPkQMJCmcTOdqgIg0iC5AWypYt0Om43z8EsC0IZj/Tr+X0Pd+mWDP124CvikMfYCSSeb/0VX1K5iqsHmJfY0USzSvKZi3NCwQGuSckRg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pA0thmHM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pA0thmHM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BDB9C4CECE; Thu, 12 Dec 2024 17:33:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734024802; bh=IUSdrSOHh0jj4njDf+n7yioFiqtpfUBBKnMLKwh+SJo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pA0thmHMFahJFZaqejpanXb7WfGVYyaBhWVtO+PfE4mzpj1W4YETqR3gaoVFxkdRp YUeTOl/MxsUjHDKokw+aW/4+JQLmAt/k3OWf7Fnw6lHLDlzPJDM6fcNaB0mbF/eU7E XC/m2I4AD/xddRQVzROZwhqoX7l9RHK1J+iTPlGw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wengang Wang , Joseph Qi , Mark Fasheh , Joel Becker , Junxiao Bi , Changwei Ge , Jun Piao , Andrew Morton Subject: [PATCH 5.10 377/459] ocfs2: update seq_file index in ocfs2_dlm_seq_next Date: Thu, 12 Dec 2024 16:01:55 +0100 Message-ID: <20241212144308.560934665@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212144253.511169641@linuxfoundation.org> References: <20241212144253.511169641@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wengang Wang commit 914eec5e980171bc128e7e24f7a22aa1d803570e upstream. The following INFO level message was seen: seq_file: buggy .next function ocfs2_dlm_seq_next [ocfs2] did not update position index Fix: Update *pos (so m->index) to make seq_read_iter happy though the index its self makes no sense to ocfs2_dlm_seq_next. Link: https://lkml.kernel.org/r/20241119174500.9198-1-wen.gang.wang@oracle.com Signed-off-by: Wengang Wang Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Cc: Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- fs/ocfs2/dlmglue.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -3101,6 +3101,7 @@ static void *ocfs2_dlm_seq_next(struct s struct ocfs2_lock_res *iter = v; struct ocfs2_lock_res *dummy = &priv->p_iter_res; + (*pos)++; spin_lock(&ocfs2_dlm_tracking_lock); iter = ocfs2_dlm_next_res(iter, priv); list_del_init(&dummy->l_debug_list);