On 12/3/21 10:46 AM, Matthew Wilcox wrote: > On Fri, Dec 03, 2021 at 09:38:25AM -0700, Jens Axboe wrote: >> On 12/3/21 9:35 AM, Jens Axboe wrote: >>> On 12/3/21 9:31 AM, Jens Axboe wrote: >>>> On 12/3/21 9:24 AM, Jens Axboe wrote: >>>>> On 12/3/21 9:16 AM, Matthew Wilcox wrote: >>>>>> On Fri, Dec 03, 2021 at 08:38:28AM -0700, Jens Axboe wrote: >>>>>>> +++ b/include/linux/fs.h >>>>>> >>>>>> fs.h is the wrong place for these functions; they're pagecache >>>>>> functionality, so they should be in pagemap.h. > > I think you missed this ^^^ I did... That would mean moving some more of the declarations too. Prep patch or just part of this patch? >>>> That does introduce a dependency from fs.h -> pagemap.h which isn't trivially >>>> resolvable... >>>> >>>> What if we just rename the above funciton to mapping_has_pages() or something >>>> instead? >>> >>> Or just drop the helper, to be honest. There are more tests for >>> mapping->nrpages right now than there are callers of this silly little >>> helper. >> >> Like this: > > I'm happy with this, if you just move it to pagemap.h OK, I'll try it out. -- Jens Axboe