diff options
author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2023-03-20 16:49:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-05 12:23:51 +0300 |
commit | f1c17475a9dcb947dafcebc1c4940750ddf495bb (patch) | |
tree | 036727a6da0fe252777212823161fda553bb289b | |
parent | b51e4422952b5c98dad46caa017c233ac783679f (diff) | |
download | linux-f1c17475a9dcb947dafcebc1c4940750ddf495bb.tar.xz |
zonefs: Fix error message in zonefs_file_dio_append()
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 <damien.lemoal@opensource.wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/zonefs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index 66a089a62c39..b9522eee1257 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -789,7 +789,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, zi->i_zsector); + bio->bi_iter.bi_sector, zi->i_zsector); ret = -EIO; } } |