On Fri, Mar 19, 2021 at 05:31:18PM -0700, Linus Torvalds wrote: > On Fri, Mar 19, 2021 at 3:46 PM Omar Sandoval <osan...@osandov.com> wrote: > > > > Not much shorter, but it is easier to follow. > > Yeah, that looks about right to me. > > You should probably use kmap_local_page() rather than kmap_atomic() > these days, but other than that this looks fairly straightforward, and > I much prefer the model where we very much force that "must be the > first iovec entry".
To be exact, this code only enforces that the iov_iter is at the beginning of the current entry. As far as I can tell, iov_iter doesn't track its position overall, so there's no way to tell whether the current entry is the first one. > As you say, maybe not shorter, but a lot more straightforward. > > That said, looking through the patch series, I see at least one other > issue. Look at parisc: > > +#define O_ALLOW_ENCODED 100000000 > > yeah, that's completely wrong. I see how it happened, but that's _really_ > wrong. Ugh, that's embarrassing. It also happens to add exactly one new bit to VALID_OPEN_FLAGS, so the BUILD_BUG_ON() in fcntl_init() didn't catch it. > I would want others to take a look in case there's something else. I'm > not qualified to comment about (nor do I deeply care) about the btrfs > parts, but the generic interface parts should most definitely get more > attention. > > By Al, if possible, but other fs people too.. That's all I ask. I'll fix your comments and wait a few days to get some more feedback on the fs side before I resend the patch bomb. Thanks, Omar