mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Abstract away platform specific superblock references
The zfsvfs->z_sb field is Linux specified and should be abstracted. Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9697
This commit is contained in:
committed by
Brian Behlendorf
parent
7bda69a1a9
commit
362ae8d11f
@@ -65,6 +65,12 @@
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
boolean_t
|
||||
zfs_vfs_held(zfsvfs_t *zfsvfs)
|
||||
{
|
||||
return (zfsvfs->z_sb != NULL);
|
||||
}
|
||||
|
||||
int
|
||||
zfs_vfs_ref(zfsvfs_t **zfvp)
|
||||
{
|
||||
@@ -75,6 +81,12 @@ zfs_vfs_ref(zfsvfs_t **zfvp)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
zfs_vfs_rele(zfsvfs_t *zfsvfs)
|
||||
{
|
||||
deactivate_super(zfsvfs->z_sb);
|
||||
}
|
||||
|
||||
static int
|
||||
zfsdev_state_init(struct file *filp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user