linux/vfsops: add vfs_t allocator, make public

In a few commits, we're going  to need to allocate and free vfs_t from
zpl_super.c as well, so lets keep them uniform.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@truenas.com>
Closes #18377
This commit is contained in:
Rob Norris
2026-03-26 11:05:59 +11:00
committed by Tony Hutter
parent 9b8ccbd2cb
commit 7843c42b27
2 changed files with 15 additions and 3 deletions
+4
View File
@@ -22,6 +22,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018 by Delphix. All rights reserved.
* Copyright (c) 2026, TrueNAS.
*/
#ifndef _SYS_FS_ZFS_VFSOPS_H
@@ -245,6 +246,9 @@ extern int zfsvfs_create_impl(zfsvfs_t **zfvp, zfsvfs_t *zfsvfs, objset_t *os);
extern void zfsvfs_free(zfsvfs_t *zfsvfs);
extern int zfs_check_global_label(const char *dsname, const char *hexsl);
extern vfs_t *zfsvfs_vfs_alloc(void);
extern void zfsvfs_vfs_free(vfs_t *vfsp);
extern boolean_t zfs_is_readonly(zfsvfs_t *zfsvfs);
extern int zfs_domount(struct super_block *sb, zfs_mnt_t *zm, int silent);
extern void zfs_preumount(struct super_block *sb);