From: Damien Le Moal Date: Mon, 20 Mar 2023 13:49:15 +0000 (+0900) Subject: zonefs: Fix error message in zonefs_file_dio_append() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fc426026c3a3bd939f1ebae31f880ecf2724cc74;p=users%2Fjedix%2Flinux-maple.git zonefs: Fix error message in zonefs_file_dio_append() [ Upstream commit 88b170088ad2c3e27086fe35769aa49f8a512564 ] 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: Sasha Levin --- diff --git a/fs/zonefs/file.c b/fs/zonefs/file.c index 738b0e28d74b..c71cc0fcb3ec 100644 --- a/fs/zonefs/file.c +++ b/fs/zonefs/file.c @@ -426,7 +426,7 @@ static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from) if (bio->bi_iter.bi_sector != wpsector) { zonefs_warn(inode->i_sb, "Corrupted write pointer %llu for zone at %llu\n", - wpsector, z->z_sector); + bio->bi_iter.bi_sector, z->z_sector); ret = -EIO; } }