diff options
author | Dave Chinner <david@fromorbit.com> | 2015-11-03 13:28:41 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-11-03 13:28:41 +1100 |
commit | 264e89ad3412ce1e2977e5e807bcf7d20d3b0a59 (patch) | |
tree | 53841fc9aed8f419765e41af5879e18d51982ca0 /fs/xfs/libxfs/xfs_alloc.c | |
parent | 2da5c4b05ab55225f5d1fcc8c1c37d1918232bf4 (diff) | |
parent | 13ad4fe3e087ab66a140f1e00d98f28aa4e3bb28 (diff) | |
download | linux-264e89ad3412ce1e2977e5e807bcf7d20d3b0a59.tar.bz2 |
Merge branch 'xfs-dax-updates' into for-next
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index e926197e0620..3479294c1d58 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -2509,7 +2509,7 @@ xfs_alloc_vextent( * Try near allocation first, then anywhere-in-ag after * the first a.g. fails. */ - if ((args->userdata == XFS_ALLOC_INITIAL_USER_DATA) && + if ((args->userdata & XFS_ALLOC_INITIAL_USER_DATA) && (mp->m_flags & XFS_MOUNT_32BITINODES)) { args->fsbno = XFS_AGB_TO_FSB(mp, ((mp->m_agfrotor / rotorstep) % @@ -2640,6 +2640,14 @@ xfs_alloc_vextent( XFS_AG_CHECK_DADDR(mp, XFS_FSB_TO_DADDR(mp, args->fsbno), args->len); #endif + + /* Zero the extent if we were asked to do so */ + if (args->userdata & XFS_ALLOC_USERDATA_ZERO) { + error = xfs_zero_extent(args->ip, args->fsbno, args->len); + if (error) + goto error0; + } + } xfs_perag_put(args->pag); return 0; |