hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/fs/jfs/jfs_extent.c
....@@ -508,6 +508,11 @@
508508 * blocks in the map. in that case, we'll start off with the
509509 * maximum free.
510510 */
511
+
512
+ /* give up if no space left */
513
+ if (bmp->db_maxfreebud == -1)
514
+ return -ENOSPC;
515
+
511516 max = (s64) 1 << bmp->db_maxfreebud;
512517 if (*nblocks >= max && *nblocks > nbperpage)
513518 nb = nblks = (max > nbperpage) ? max : nbperpage;