On Wed, Nov 25, 2026 at 09:37:11PM +0000, Harry Yoo (Meta) wrote:
> fanotify events are allocated with GFP_KERNEL_ACCOUNT and charged to > the memcg of the listener. Specify SLAB_MAY_ACCOUNT when the object > may be charged to a memcg. __GFP_ACCOUNT without SLAB_MAY_ACCOUNT > will not be allowed. > > Path: fsnotify() -> fanotify_handle_event() > -> fanotify_alloc_event(GFP_KERNEL_ACCOUNT) > -> kmem_cache_alloc(fanotify_{fid,path,perm,mnt}_event_cachep) > > Cc: Jan Kara <ja…@suse.cz> > Cc: Amir Goldstein <amir…@gmail.com> > Cc: linu…@vger.kernel.org > Signed-off-by: Harry Yoo (Meta) <har…@kernel.org> > --- > fs/notify/fanotify/fanotify_user.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-)
Looks good to me. Reviewed-by: Hao Li <hao…@linux.dev>
-- Thanks, Hao