diff options
| author | Dave Chinner <david@fromorbit.com> | 2022-05-04 12:37:02 +1000 |
|---|---|---|
| committer | Dave Chinner <david@fromorbit.com> | 2022-05-04 12:37:02 +1000 |
| commit | 5e116e99dc94c84650a94aaf51d0c5bca3702352 (patch) | |
| tree | b928882c094a90efbc991996b95c046f3bd80db0 /fs/xfs/libxfs/xfs_inode_fork.c | |
| parent | 9cf4f6160c20bbdb53f20a773d48ab6dfa3b49e3 (diff) | |
| parent | 0d227466be84332d1888724e1e74dac34bff6d71 (diff) | |
Merge branch 'guilt/xlog-intent-whiteouts' into xfs-5.19-for-next
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_fork.c')
| -rw-r--r-- | fs/xfs/libxfs/xfs_inode_fork.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c index 9aee4a1e2fe9..1a4cdf550f6d 100644 --- a/fs/xfs/libxfs/xfs_inode_fork.c +++ b/fs/xfs/libxfs/xfs_inode_fork.c @@ -36,7 +36,7 @@ xfs_init_local_fork( int64_t size) { struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, whichfork); - int mem_size = size, real_size = 0; + int mem_size = size; bool zero_terminate; /* @@ -50,8 +50,7 @@ xfs_init_local_fork( mem_size++; if (size) { - real_size = roundup(mem_size, 4); - ifp->if_u1.if_data = kmem_alloc(real_size, KM_NOFS); + ifp->if_u1.if_data = kmem_alloc(mem_size, KM_NOFS); memcpy(ifp->if_u1.if_data, data, size); if (zero_terminate) ifp->if_u1.if_data[size] = '\0'; @@ -497,12 +496,7 @@ xfs_idata_realloc( return; } - /* - * For inline data, the underlying buffer must be a multiple of 4 bytes - * in size so that it can be logged and stay on word boundaries. - * We enforce that here. - */ - ifp->if_u1.if_data = krealloc(ifp->if_u1.if_data, roundup(new_size, 4), + ifp->if_u1.if_data = krealloc(ifp->if_u1.if_data, new_size, GFP_NOFS | __GFP_NOFAIL); ifp->if_bytes = new_size; } |
