diff options
author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2023-03-20 22:49:15 +0900 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2023-03-21 06:36:43 +0900 |
commit | 88b170088ad2c3e27086fe35769aa49f8a512564 (patch) | |
tree | 4bbd1f3e7137c2a3a74763bb1d39207b421a61a9 /fs/zonefs | |
parent | d7e673c2a900206bea3461a4b4ecc74ea930f80e (diff) | |
download | linux-stable-88b170088ad2c3e27086fe35769aa49f8a512564.tar.gz linux-stable-88b170088ad2c3e27086fe35769aa49f8a512564.tar.bz2 linux-stable-88b170088ad2c3e27086fe35769aa49f8a512564.zip |
zonefs: Fix error message in zonefs_file_dio_append()
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>
Diffstat (limited to 'fs/zonefs')
-rw-r--r-- | fs/zonefs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/zonefs/file.c b/fs/zonefs/file.c index a545a6d9a32e..617e4f9db42e 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; } } |