mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 13:19:56 -04:00
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:
committed by
Eric Biggers
parent
90950ee563
commit
cd7db2e7df
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user