fscrypt: pass a byte offset to fscrypt_zeroout_range

Logical offsets into an inode are usually expressed as bytes in the VFS.
Switch fscrypt_zeroout_range to that convention.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20260302141922.370070-12-hch@lst.de
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
This commit is contained in:
Christoph Hellwig
2026-03-02 06:18:16 -08:00
committed by Eric Biggers
parent 90950ee563
commit cd7db2e7df
4 changed files with 10 additions and 8 deletions

View File

@@ -4162,7 +4162,9 @@ static int f2fs_secure_erase(struct block_device *bdev, struct inode *inode,
if (!ret && (flags & F2FS_TRIM_FILE_ZEROOUT)) {
if (IS_ENCRYPTED(inode))
ret = fscrypt_zeroout_range(inode, off, block, len);
ret = fscrypt_zeroout_range(inode,
(loff_t)off << inode->i_blkbits, block,
len);
else
ret = blkdev_issue_zeroout(bdev, sector, nr_sects,
GFP_NOFS, 0);