Torvalds Blasts 41,000-Line AI-Heavy ext4 Patch, Then Merges It
Linus Torvalds rebuked ext4 maintainer Theodore Ts'o over a late, largely AI-generated pull request of 41,000-plus lines, but kept it in Linux 7.4.
Linus Torvalds, the creator and lead maintainer of the Linux kernel, publicly scolded one of the project’s most senior developers last week over a pull request that added more than 41,000 lines of code late in the Linux 7.4 release cycle, much of it bug fixes generated with artificial intelligence. Despite telling the developer to “tell your AI companion to get its act together,” Torvalds merged the changes anyway, according to accounts of the mailing-list exchange published by the Linux news sites It’s FOSS and Linux Stans.
What happened
The request came from Theodore Ts’o, the longtime maintainer of ext4, the file system that stores data on a large share of Linux machines. Linux Stans reported that Ts’o sent it on Tuesday, Nov. 24, intended for 7.4-rc5, the fifth weekly “release candidate” test build of the upcoming kernel. Release candidates are meant for stabilizing code, not for absorbing large new batches of work, which normally land during a roughly two-week “merge window” at the start of each cycle.
The pull request bundled 94 commits touching 68 files, both outlets reported. Linux Stans, citing the diff statistics, put the total at 41,197 lines added and 621 removed, from 35 different authors. It’s FOSS noted that the resulting merge commit shows slightly more, 41,204 added lines; the small gap was not explained.
Most of that volume was not new file system logic. According to Linux Stans, about 38,000 of the changed lines sit in 22 test files using KUnit, the kernel’s built-in unit-testing framework, with only about 3,500 lines elsewhere. Ts’o described the batch as containing a large number of bug fixes, most of them AI generated, and said the new tests were there to help validate patches produced by AI, It’s FOSS reported.
The fixes themselves addressed real problems, according to both outlets, including:
- Cases where data could be lost, such as data that had been synced to disk being lost after a journal flush, and loss during migration of older ext3 files;
- Use-after-free errors, a class of memory bug that can crash systems or open security holes;
- Out-of-bounds memory accesses when reading corrupted file systems;
- A directory-reading problem affecting large directories on 32-bit kernels.
The request also included three small performance changes, among them a tweak to speed up creating many files in parallel.
Torvalds’ objection
Torvalds replied hours later. His complaint centered on timing and size rather than on the use of AI itself. As both outlets summarized it, he argued that labeling something a fix does not make it appropriate for a release candidate, and that adding tens of thousands of lines this late carries risk even when most of it is tests. Fixes for old, subtle bugs can introduce new bugs of their own, whether a person or a machine wrote them, he warned, according to It’s FOSS.
In a message laced with profanity, Torvalds told Ts’o to do “any new development and test-cases ON A SEPARATE DAMN BRANCH, so that it can be merged during the MERGE WINDOW,” It’s FOSS reported. Linux Stans said he also warned that he would ignore the next pull request that looked like this one.
Why he merged it anyway
Ts’o responded with an apology, according to Linux Stans. Both outlets said he explained that the tests already sat on their own branch and had been placed at the end of the request so they could be dropped easily, and he offered to resend a trimmed version without them, holding the tests for the next merge window.
By then, however, Torvalds had already pulled the code. In a follow-up early on Nov. 25, he said he still partly objected but that unwinding the merge was not worth the trouble given conflicts created by the test infrastructure changes, the outlets reported. Linux Stans said he asked Ts’o to double-check how he had resolved those conflicts, noting that he had not run the tests himself.
Why it matters
The episode is the latest sign of how AI coding and bug-hunting tools are reshaping work on Linux, one of the world’s most widely used pieces of software, running everything from Android phones to cloud servers. It’s FOSS reported that Torvalds has said the 7.4 merge window brought in almost 20,000 commits, compared with roughly 15,000 in a typical cycle, a jump he has linked to AI-assisted fixes.
Torvalds is not opposed to the technology. Both outlets noted that he has said Linux is not an “anti-AI” project, and Linux Stans pointed to reports that he has experimented with AI coding tools himself. His stated preference, according to It’s FOSS, is for AI-generated fixes to arrive during the merge window, where they can be absorbed and tested, rather than late in a cycle when the focus should be on stability. Earlier this year he also complained about bloated release candidates filled with low-value, often AI-assisted, pull requests and promised to push back harder.
What comes next
Kernel cycles usually end somewhere between the sixth and ninth release candidate, and Linux Stans said a stable Linux 7.4 release is expected in late December. The ext4 changes are now part of that release, while the rest of the kernel community watches whether maintainers heed Torvalds’ warning to keep large AI-driven batches out of the late stages of future cycles.


