Skip to content

Commit 70c537b

Browse files
sean-jcyamahata
authored andcommitted
fs: Export anon_inode_getfile_secure() for use by KVM
Export anon_inode_getfile_secure() so that it can be used by KVM to create and manage file-based guest memory without need a fullblow filesystem. The "standard" anon_inode_getfd() doesn't work for KVM's use case as KVM needs a unique inode for each file, e.g. to be able to independently manage the size and lifecycle of a given file. Note, KVM doesn't need a "secure" version, just unique inodes, i.e. ignore the name. Signed-off-by: Sean Christopherson <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8aef7ac commit 70c537b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/anon_inodes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ struct file *anon_inode_getfile_secure(const char *name,
176176
return __anon_inode_getfile(name, fops, priv, flags,
177177
context_inode, true);
178178
}
179+
EXPORT_SYMBOL_GPL(anon_inode_getfile_secure);
179180

180181
static int __anon_inode_getfd(const char *name,
181182
const struct file_operations *fops,

0 commit comments

Comments
 (0)