aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_mount.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 31453ca0f3dd..a66b39805176 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1154,7 +1154,9 @@ xfs_mountfs(
1154 * This may drive us straight to ENOSPC on mount, but that implies 1154 * This may drive us straight to ENOSPC on mount, but that implies
1155 * we were already there on the last unmount. 1155 * we were already there on the last unmount.
1156 */ 1156 */
1157 resblks = min_t(__uint64_t, mp->m_sb.sb_dblocks / 20, 1024); 1157 resblks = mp->m_sb.sb_dblocks;
1158 do_div(resblks, 20);
1159 resblks = min_t(__uint64_t, resblks, 1024);
1158 xfs_reserve_blocks(mp, &resblks, NULL); 1160 xfs_reserve_blocks(mp, &resblks, NULL);
1159 1161
1160 return 0; 1162 return 0;