[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220411152647.uvl2ukuwishsckys@box.shutemov.name>
Date: Mon, 11 Apr 2022 18:26:47 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Chao Peng <chao.p.peng@...ux.intel.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
linux-api@...r.kernel.org, qemu-devel@...gnu.org,
Wanpeng Li <wanpengli@...cent.com>, jun.nakajima@...el.com,
david@...hat.com, "J . Bruce Fields" <bfields@...ldses.org>,
dave.hansen@...el.com, "H . Peter Anvin" <hpa@...or.com>,
ak@...ux.intel.com, Jonathan Corbet <corbet@....net>,
Joerg Roedel <joro@...tes.org>, x86@...nel.org,
Hugh Dickins <hughd@...gle.com>,
Steven Price <steven.price@....com>,
Ingo Molnar <mingo@...hat.com>,
"Maciej S . Szmigiero" <mail@...iej.szmigiero.name>,
Borislav Petkov <bp@...en8.de>, luto@...nel.org,
Thomas Gleixner <tglx@...utronix.de>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>,
Jim Mattson <jmattson@...gle.com>,
Sean Christopherson <seanjc@...gle.com>,
Jeff Layton <jlayton@...nel.org>,
Yu Zhang <yu.c.zhang@...ux.intel.com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vishal Annapurve <vannapurve@...gle.com>,
Mike Rapoport <rppt@...nel.org>
Subject: Re: [PATCH v5 03/13] mm/shmem: Support memfile_notifier
On Thu, Mar 10, 2022 at 10:09:01PM +0800, Chao Peng wrote:
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 9b31a7056009..7b43e274c9a2 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -903,6 +903,28 @@ static struct folio *shmem_get_partial_folio(struct inode *inode, pgoff_t index)
> return page ? page_folio(page) : NULL;
> }
>
> +static void notify_fallocate(struct inode *inode, pgoff_t start, pgoff_t end)
> +{
> +#ifdef CONFIG_MEMFILE_NOTIFIER
> + struct shmem_inode_info *info = SHMEM_I(inode);
> +
> + memfile_notifier_fallocate(&info->memfile_notifiers, start, end);
> +#endif
All these #ifdefs look ugly. Could you provide dummy memfile_* for
!MEMFILE_NOTIFIER case?
--
Kirill A. Shutemov
Powered by blists - more mailing lists