|
@@ -240,7 +240,7 @@ xfs_iomap_write_direct(
|
|
*/
|
|
*/
|
|
if (IS_DAX(VFS_I(ip))) {
|
|
if (IS_DAX(VFS_I(ip))) {
|
|
bmapi_flags = XFS_BMAPI_CONVERT | XFS_BMAPI_ZERO;
|
|
bmapi_flags = XFS_BMAPI_CONVERT | XFS_BMAPI_ZERO;
|
|
- if (ISUNWRITTEN(imap)) {
|
|
|
|
|
|
+ if (imap->br_state == XFS_EXT_UNWRITTEN) {
|
|
tflags |= XFS_TRANS_RESERVE;
|
|
tflags |= XFS_TRANS_RESERVE;
|
|
resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0) << 1;
|
|
resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0) << 1;
|
|
}
|
|
}
|
|
@@ -945,7 +945,7 @@ static inline bool imap_needs_alloc(struct inode *inode,
|
|
return !nimaps ||
|
|
return !nimaps ||
|
|
imap->br_startblock == HOLESTARTBLOCK ||
|
|
imap->br_startblock == HOLESTARTBLOCK ||
|
|
imap->br_startblock == DELAYSTARTBLOCK ||
|
|
imap->br_startblock == DELAYSTARTBLOCK ||
|
|
- (IS_DAX(inode) && ISUNWRITTEN(imap));
|
|
|
|
|
|
+ (IS_DAX(inode) && imap->br_state == XFS_EXT_UNWRITTEN);
|
|
}
|
|
}
|
|
|
|
|
|
static inline bool need_excl_ilock(struct xfs_inode *ip, unsigned flags)
|
|
static inline bool need_excl_ilock(struct xfs_inode *ip, unsigned flags)
|