From: "Gupta, Pankaj" <pankaj.gupta@amd.com>
To: Shivank Garg <shivankg@amd.com>,
pbonzini@redhat.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: bharata@amd.com, tabba@google.com, ackerleytng@google.com
Subject: Re: [PATCH] KVM: guest_memfd: Remove redundant kvm_gmem_getattr implementation
Date: Wed, 25 Jun 2025 14:26:39 +0200 [thread overview]
Message-ID: <cbae3475-0c4c-4a71-af8d-67cc8bb7de21@amd.com> (raw)
In-Reply-To: <20250602172317.10601-1-shivankg@amd.com>
On 6/2/2025 7:23 PM, Shivank Garg wrote:
> Remove the redundant kvm_gmem_getattr() implementation that simply calls
> generic_fillattr() without any special handling. The VFS layer
> (vfs_getattr_nosec()) will call generic_fillattr() by default when no
> custom getattr operation is provided in the inode_operations structure.
>
> This is a cleanup with no functional change.
>
> Signed-off-by: Shivank Garg <shivankg@amd.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
> ---
> virt/kvm/guest_memfd.c | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c
> index b2aa6bf24d3a..7d85cc33c0bb 100644
> --- a/virt/kvm/guest_memfd.c
> +++ b/virt/kvm/guest_memfd.c
> @@ -382,23 +382,12 @@ static const struct address_space_operations kvm_gmem_aops = {
> #endif
> };
>
> -static int kvm_gmem_getattr(struct mnt_idmap *idmap, const struct path *path,
> - struct kstat *stat, u32 request_mask,
> - unsigned int query_flags)
> -{
> - struct inode *inode = path->dentry->d_inode;
> -
> - generic_fillattr(idmap, request_mask, inode, stat);
> - return 0;
> -}
> -
> static int kvm_gmem_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
> struct iattr *attr)
> {
> return -EINVAL;
> }
> static const struct inode_operations kvm_gmem_iops = {
> - .getattr = kvm_gmem_getattr,
> .setattr = kvm_gmem_setattr,
> };
>
next prev parent reply other threads:[~2025-06-25 12:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-02 17:23 [PATCH] KVM: guest_memfd: Remove redundant kvm_gmem_getattr implementation Shivank Garg
2025-06-02 19:57 ` Ackerley Tng
2025-06-24 19:57 ` Sean Christopherson
2025-06-25 5:25 ` Shivank Garg
2025-06-25 12:26 ` Gupta, Pankaj [this message]
2025-06-25 22:25 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cbae3475-0c4c-4a71-af8d-67cc8bb7de21@amd.com \
--to=pankaj.gupta@amd.com \
--cc=ackerleytng@google.com \
--cc=bharata@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=shivankg@amd.com \
--cc=tabba@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox