diff options
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index f100c1780e03..0c9a5ee3e106 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -383,6 +383,21 @@ static int __check_block_validity(struct inode *inode, const char *func, | |||
383 | return 0; | 383 | return 0; |
384 | } | 384 | } |
385 | 385 | ||
386 | int ext4_issue_zeroout(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, | ||
387 | ext4_lblk_t len) | ||
388 | { | ||
389 | int ret; | ||
390 | |||
391 | if (ext4_encrypted_inode(inode)) | ||
392 | return ext4_encrypted_zeroout(inode, lblk, pblk, len); | ||
393 | |||
394 | ret = sb_issue_zeroout(inode->i_sb, pblk, len, GFP_NOFS); | ||
395 | if (ret > 0) | ||
396 | ret = 0; | ||
397 | |||
398 | return ret; | ||
399 | } | ||
400 | |||
386 | #define check_block_validity(inode, map) \ | 401 | #define check_block_validity(inode, map) \ |
387 | __check_block_validity((inode), __func__, __LINE__, (map)) | 402 | __check_block_validity((inode), __func__, __LINE__, (map)) |
388 | 403 | ||