Jeff Layton <jlayton@xxxxxxxxxx> wrote: > Some kerneldoc comments on these new helpers would be nice. I assume > that "index" and "to" are "start" and "end" for this, but it'd be nice > to make that explicit. These are internal to netfs not API functions, so they shouldn't appear in the API docs. That's why the declaration is in internal.h, not netfs.h. That said, I could describe them better. > > + ret = netfs_add_folios_to_buffer(buffer, mapping, want_index, > > + have_index - 1, gfp_mask); > > + if (ret < 0) > > + return ret; > > + have_folios += have_index - want_index; > > + > > + ret = netfs_add_folios_to_buffer(buffer, mapping, > > + have_index + have_folios, > > + want_index + want_folios - 1, > > + gfp_mask); > > I don't get it. Why are you calling netfs_add_folios_to_buffer twice > here? Why not just make one call? Either way, a comment here explaining > that would also be nice. The ranges aren't contiguous. They bracket the folios spliced from the mapping. That being said, I seem to have lost a bit of maths somewhere. Further, I'm not now using netfs_add_folios_to_buffer(), so I'll remove it. David -- You received this message because you are subscribed to the Google Groups "linux-cachefs@xxxxxxxxxx" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-cachefs+unsubscribe@xxxxxxxxxx.