|
@@ -851,7 +851,11 @@ xfs_setattr_size(
|
|
* to hope that the caller sees ENOMEM and retries the truncate
|
|
* to hope that the caller sees ENOMEM and retries the truncate
|
|
* operation.
|
|
* operation.
|
|
*/
|
|
*/
|
|
- error = block_truncate_page(inode->i_mapping, newsize, xfs_get_blocks);
|
|
|
|
|
|
+ if (IS_DAX(inode))
|
|
|
|
+ error = dax_truncate_page(inode, newsize, xfs_get_blocks_direct);
|
|
|
|
+ else
|
|
|
|
+ error = block_truncate_page(inode->i_mapping, newsize,
|
|
|
|
+ xfs_get_blocks);
|
|
if (error)
|
|
if (error)
|
|
return error;
|
|
return error;
|
|
truncate_setsize(inode, newsize);
|
|
truncate_setsize(inode, newsize);
|