From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D0DBC761A6 for ; Mon, 3 Apr 2023 14:35:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233576AbjDCOeu (ORCPT ); Mon, 3 Apr 2023 10:34:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233585AbjDCOet (ORCPT ); Mon, 3 Apr 2023 10:34:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5F7916F14 for ; Mon, 3 Apr 2023 07:34:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8B726B81C94 for ; Mon, 3 Apr 2023 14:34:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1C91C4339B; Mon, 3 Apr 2023 14:34:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680532463; bh=FR5u52SBigRcZgh7KOyPkM9hKkygE68XFcNclaEP+NI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rM1POfUX4Je//MVTIrMFa2HtawHF73Ekh9mKDFaRkmEQZv3+QInWEC6fqYD37C7wV Los9iP/d5OunOs/1HTkAUneJ/tG0KyqVNH5eYP8YYeAY7wiuy2lcSTPRlFvvdaA8PJ Eib+/XJSCaf2Zt3b6wWFa+RDsMVWcYbfpr9cohC8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Damien Le Moal , Christoph Hellwig , Johannes Thumshirn , Himanshu Madhani Subject: [PATCH 5.15 93/99] zonefs: Fix error message in zonefs_file_dio_append() Date: Mon, 3 Apr 2023 16:09:56 +0200 Message-Id: <20230403140406.844147242@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403140356.079638751@linuxfoundation.org> References: <20230403140356.079638751@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Damien Le Moal commit 88b170088ad2c3e27086fe35769aa49f8a512564 upstream. Since the expected write location in a sequential file is always at the end of the file (append write), when an invalid write append location is detected in zonefs_file_dio_append(), print the invalid written location instead of the expected write location. Fixes: a608da3bd730 ("zonefs: Detect append writes at invalid locations") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani Signed-off-by: Greg Kroah-Hartman --- fs/zonefs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -796,7 +796,7 @@ static ssize_t zonefs_file_dio_append(st if (bio->bi_iter.bi_sector != wpsector) { zonefs_warn(inode->i_sb, "Corrupted write pointer %llu for zone at %llu\n", - wpsector, zi->i_zsector); + bio->bi_iter.bi_sector, zi->i_zsector); ret = -EIO; } }