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 79CF26FA1 for ; Mon, 3 Apr 2023 14:34:23 +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 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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; } }