diff options
-rw-r--r-- | fs/xfs/xfs_inode_fork.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/xfs_inode_fork.c b/fs/xfs/xfs_inode_fork.c index 22c9837c5d4b..cfee14a83cfe 100644 --- a/fs/xfs/xfs_inode_fork.c +++ b/fs/xfs/xfs_inode_fork.c | |||
@@ -1021,15 +1021,14 @@ xfs_iext_add( | |||
1021 | * the next index needed in the indirection array. | 1021 | * the next index needed in the indirection array. |
1022 | */ | 1022 | */ |
1023 | else { | 1023 | else { |
1024 | int count = ext_diff; | 1024 | uint count = ext_diff; |
1025 | 1025 | ||
1026 | while (count) { | 1026 | while (count) { |
1027 | erp = xfs_iext_irec_new(ifp, erp_idx); | 1027 | erp = xfs_iext_irec_new(ifp, erp_idx); |
1028 | erp->er_extcount = count; | 1028 | erp->er_extcount = min(count, XFS_LINEAR_EXTS); |
1029 | count -= MIN(count, (int)XFS_LINEAR_EXTS); | 1029 | count -= erp->er_extcount; |
1030 | if (count) { | 1030 | if (count) |
1031 | erp_idx++; | 1031 | erp_idx++; |
1032 | } | ||
1033 | } | 1032 | } |
1034 | } | 1033 | } |
1035 | } | 1034 | } |