diff options
| author | Shivank Garg <shivankg@amd.com> | 2025-06-02 20:23:18 +0300 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2025-06-25 23:42:33 +0300 |
| commit | 87d4fbf4a387f207d6906806ef6bf5c8eb289bd7 (patch) | |
| tree | fa1efea343ade1670cac63a4a2dc61b356991582 /virt | |
| parent | aa006b2e515959e3575acebca6292f060da94c12 (diff) | |
| download | linux-87d4fbf4a387f207d6906806ef6bf5c8eb289bd7.tar.xz | |
KVM: guest_memfd: Remove redundant kvm_gmem_getattr implementation
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: Ackerley Tng <ackerleytng@google.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Link: https://lore.kernel.org/r/20250602172317.10601-1-shivankg@amd.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'virt')
| -rw-r--r-- | virt/kvm/guest_memfd.c | 11 |
1 files changed, 0 insertions, 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, }; |
