summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-03-08 17:56:19 -0500
committerBrian Behlendorf <[email protected]>2017-03-10 09:51:35 -0800
commitf298b24ddf9695fb74603a257e2a58dd7baf0159 (patch)
tree1af22ecf10386cfa79555bd819a8948491a9f338 /module
parent0037b49e833a7073bee0ef3f6680f330f727769e (diff)
Rename zfs_* functions
Several functions were renamed when ZFS was originally ported to Linux. Revert the code to the original names to minimize the delta with upstream OpenZFS. zfs_sb_teardown -> zfsvfs_teardown zfs_sb_create -> zfsvfs_create zfs_sb_setup -> zfsvfs_setup zfs_sb_free -> zfsvfs_free get_zfs_sb -> getzfsvfs zfs_sb_hold -> zfsvfs_hold zfs_sb_rele -> zfsvfs_rele zfs_sb_prune_aliases -> zfs_prune_aliases (Linux-only) zfs_sb_prune -> zfs_prune (Linux only) Align the zfs_vnops.h and zfs_vfsops.h with upstream as much as possible. Several prototypes were removed and those that remain were reordered. Move the EXPORT_SYMBOL lines to the end of the source files for consistency with the other source files. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module')
-rw-r--r--module/zfs/zfs_ioctl.c34
-rw-r--r--module/zfs/zfs_vfsops.c78
-rw-r--r--module/zfs/zfs_vnops.c59
-rw-r--r--module/zfs/zpl_super.c2
4 files changed, 85 insertions, 88 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index 42889ee03..e89306a59 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -1394,7 +1394,7 @@ put_nvlist(zfs_cmd_t *zc, nvlist_t *nvl)
}
static int
-get_zfs_sb(const char *dsname, zfsvfs_t **zfvp)
+getzfsvfs(const char *dsname, zfsvfs_t **zfvp)
{
objset_t *os;
int error;
@@ -1426,12 +1426,12 @@ get_zfs_sb(const char *dsname, zfsvfs_t **zfvp)
* which prevents all inode ops from running.
*/
static int
-zfs_sb_hold(const char *name, void *tag, zfsvfs_t **zfvp, boolean_t writer)
+zfsvfs_hold(const char *name, void *tag, zfsvfs_t **zfvp, boolean_t writer)
{
int error = 0;
- if (get_zfs_sb(name, zfvp) != 0)
- error = zfs_sb_create(name, NULL, zfvp);
+ if (getzfsvfs(name, zfvp) != 0)
+ error = zfsvfs_create(name, NULL, zfvp);
if (error == 0) {
rrm_enter(&(*zfvp)->z_teardown_lock, (writer) ? RW_WRITER :
RW_READER, tag);
@@ -1449,7 +1449,7 @@ zfs_sb_hold(const char *name, void *tag, zfsvfs_t **zfvp, boolean_t writer)
}
static void
-zfs_sb_rele(zfsvfs_t *zfsvfs, void *tag)
+zfsvfs_rele(zfsvfs_t *zfsvfs, void *tag)
{
rrm_exit(&zfsvfs->z_teardown_lock, tag);
@@ -1457,7 +1457,7 @@ zfs_sb_rele(zfsvfs_t *zfsvfs, void *tag)
deactivate_super(zfsvfs->z_sb);
} else {
dmu_objset_disown(zfsvfs->z_os, zfsvfs);
- zfs_sb_free(zfsvfs);
+ zfsvfs_free(zfsvfs);
}
}
@@ -2349,10 +2349,10 @@ zfs_prop_set_userquota(const char *dsname, nvpair_t *pair)
rid = valary[1];
quota = valary[2];
- err = zfs_sb_hold(dsname, FTAG, &zfsvfs, B_FALSE);
+ err = zfsvfs_hold(dsname, FTAG, &zfsvfs, B_FALSE);
if (err == 0) {
err = zfs_set_userquota(zfsvfs, type, domain, rid, quota);
- zfs_sb_rele(zfsvfs, FTAG);
+ zfsvfs_rele(zfsvfs, FTAG);
}
return (err);
@@ -2431,11 +2431,11 @@ zfs_prop_set_special(const char *dsname, zprop_source_t source,
{
zfsvfs_t *zfsvfs;
- if ((err = zfs_sb_hold(dsname, FTAG, &zfsvfs, B_TRUE)) != 0)
+ if ((err = zfsvfs_hold(dsname, FTAG, &zfsvfs, B_TRUE)) != 0)
break;
err = zfs_set_version(zfsvfs, intval);
- zfs_sb_rele(zfsvfs, FTAG);
+ zfsvfs_rele(zfsvfs, FTAG);
if (err == 0 && intval >= ZPL_VERSION_USERSPACE) {
zfs_cmd_t *zc;
@@ -3644,7 +3644,7 @@ zfs_ioc_rollback(const char *fsname, nvlist_t *args, nvlist_t *outnvl)
zvol_state_t *zv;
int error;
- if (get_zfs_sb(fsname, &zfsvfs) == 0) {
+ if (getzfsvfs(fsname, &zfsvfs) == 0) {
dsl_dataset_t *ds;
ds = dmu_objset_ds(zfsvfs->z_os);
@@ -4249,7 +4249,7 @@ zfs_ioc_recv_impl(char *tofs, char *tosnap, char *origin,
zfsvfs_t *zfsvfs = NULL;
zvol_state_t *zv = NULL;
- if (get_zfs_sb(tofs, &zfsvfs) == 0) {
+ if (getzfsvfs(tofs, &zfsvfs) == 0) {
/* online recv */
dsl_dataset_t *ds;
int end_err;
@@ -4875,13 +4875,13 @@ zfs_ioc_userspace_one(zfs_cmd_t *zc)
if (zc->zc_objset_type >= ZFS_NUM_USERQUOTA_PROPS)
return (SET_ERROR(EINVAL));
- error = zfs_sb_hold(zc->zc_name, FTAG, &zfsvfs, B_FALSE);
+ error = zfsvfs_hold(zc->zc_name, FTAG, &zfsvfs, B_FALSE);
if (error != 0)
return (error);
error = zfs_userspace_one(zfsvfs,
zc->zc_objset_type, zc->zc_value, zc->zc_guid, &zc->zc_cookie);
- zfs_sb_rele(zfsvfs, FTAG);
+ zfsvfs_rele(zfsvfs, FTAG);
return (error);
}
@@ -4908,7 +4908,7 @@ zfs_ioc_userspace_many(zfs_cmd_t *zc)
if (bufsize <= 0)
return (SET_ERROR(ENOMEM));
- error = zfs_sb_hold(zc->zc_name, FTAG, &zfsvfs, B_FALSE);
+ error = zfsvfs_hold(zc->zc_name, FTAG, &zfsvfs, B_FALSE);
if (error != 0)
return (error);
@@ -4923,7 +4923,7 @@ zfs_ioc_userspace_many(zfs_cmd_t *zc)
zc->zc_nvlist_dst_size);
}
vmem_free(buf, bufsize);
- zfs_sb_rele(zfsvfs, FTAG);
+ zfsvfs_rele(zfsvfs, FTAG);
return (error);
}
@@ -4942,7 +4942,7 @@ zfs_ioc_userspace_upgrade(zfs_cmd_t *zc)
int error = 0;
zfsvfs_t *zfsvfs;
- if (get_zfs_sb(zc->zc_name, &zfsvfs) == 0) {
+ if (getzfsvfs(zc->zc_name, &zfsvfs) == 0) {
if (!dmu_objset_userused_enabled(zfsvfs->z_os)) {
/*
* If userused is not enabled, it may be because the
diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c
index 40e9a5c6a..c55c50088 100644
--- a/module/zfs/zfs_vfsops.c
+++ b/module/zfs/zfs_vfsops.c
@@ -121,14 +121,12 @@ zfs_sync(struct super_block *sb, int wait, cred_t *cr)
return (0);
}
-EXPORT_SYMBOL(zfs_sync);
boolean_t
zfs_is_readonly(zfsvfs_t *zfsvfs)
{
return (!!(zfsvfs->z_sb->s_flags & MS_RDONLY));
}
-EXPORT_SYMBOL(zfs_is_readonly);
static void
atime_changed_cb(void *arg, uint64_t newval)
@@ -345,7 +343,6 @@ unregister:
dsl_prop_unregister_all(ds, zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_register_callbacks);
static int
zfs_space_delta_cb(dmu_object_type_t bonustype, void *data,
@@ -508,7 +505,6 @@ zfs_userspace_many(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type,
zap_cursor_fini(&zc);
return (error);
}
-EXPORT_SYMBOL(zfs_userspace_many);
/*
* buf must be big enough (eg, 32 bytes)
@@ -567,7 +563,6 @@ zfs_userspace_one(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type,
err = 0;
return (err);
}
-EXPORT_SYMBOL(zfs_userspace_one);
int
zfs_set_userquota(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type,
@@ -640,7 +635,6 @@ zfs_set_userquota(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type,
dmu_tx_commit(tx);
return (err);
}
-EXPORT_SYMBOL(zfs_set_userquota);
boolean_t
zfs_fuid_overobjquota(zfsvfs_t *zfsvfs, boolean_t isgroup, uint64_t fuid)
@@ -696,7 +690,6 @@ zfs_fuid_overquota(zfsvfs_t *zfsvfs, boolean_t isgroup, uint64_t fuid)
return (B_FALSE);
return (used >= quota);
}
-EXPORT_SYMBOL(zfs_fuid_overquota);
boolean_t
zfs_owner_overquota(zfsvfs_t *zfsvfs, znode_t *zp, boolean_t isgroup)
@@ -714,7 +707,6 @@ zfs_owner_overquota(zfsvfs_t *zfsvfs, znode_t *zp, boolean_t isgroup)
return (zfs_fuid_overquota(zfsvfs, isgroup, fuid));
}
-EXPORT_SYMBOL(zfs_owner_overquota);
zfs_mntopts_t *
zfs_mntopts_alloc(void)
@@ -735,7 +727,7 @@ zfs_mntopts_free(zfs_mntopts_t *zmo)
}
int
-zfs_sb_create(const char *osname, zfs_mntopts_t *zmo, zfsvfs_t **zfvp)
+zfsvfs_create(const char *osname, zfs_mntopts_t *zmo, zfsvfs_t **zfvp)
{
objset_t *os;
zfsvfs_t *zfsvfs;
@@ -746,7 +738,7 @@ zfs_sb_create(const char *osname, zfs_mntopts_t *zmo, zfsvfs_t **zfvp)
zfsvfs = kmem_zalloc(sizeof (zfsvfs_t), KM_SLEEP);
/*
- * Optional temporary mount options, free'd in zfs_sb_free().
+ * Optional temporary mount options, free'd in zfsvfs_free().
*/
zfsvfs->z_mntopts = (zmo ? zmo : zfs_mntopts_alloc());
@@ -903,10 +895,9 @@ out_zmo:
kmem_free(zfsvfs, sizeof (zfsvfs_t));
return (error);
}
-EXPORT_SYMBOL(zfs_sb_create);
int
-zfs_sb_setup(zfsvfs_t *zfsvfs, boolean_t mounting)
+zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t mounting)
{
int error;
@@ -986,10 +977,9 @@ zfs_sb_setup(zfsvfs_t *zfsvfs, boolean_t mounting)
return (0);
}
-EXPORT_SYMBOL(zfs_sb_setup);
void
-zfs_sb_free(zfsvfs_t *zfsvfs)
+zfsvfs_free(zfsvfs_t *zfsvfs)
{
int i, size = zfsvfs->z_hold_size;
@@ -1010,7 +1000,6 @@ zfs_sb_free(zfsvfs_t *zfsvfs)
zfs_mntopts_free(zfsvfs->z_mntopts);
kmem_free(zfsvfs, sizeof (zfsvfs_t));
}
-EXPORT_SYMBOL(zfs_sb_free);
static void
zfs_set_fuid_feature(zfsvfs_t *zfsvfs)
@@ -1027,7 +1016,6 @@ zfs_unregister_callbacks(zfsvfs_t *zfsvfs)
if (!dmu_objset_is_snapshot(os))
dsl_prop_unregister_all(dmu_objset_ds(os), zfsvfs);
}
-EXPORT_SYMBOL(zfs_unregister_callbacks);
#ifdef HAVE_MLSLABEL
/*
@@ -1056,7 +1044,6 @@ zfs_check_global_label(const char *dsname, const char *hexsl)
}
return (SET_ERROR(EACCES));
}
-EXPORT_SYMBOL(zfs_check_global_label);
#endif /* HAVE_MLSLABEL */
int
@@ -1120,7 +1107,6 @@ zfs_statvfs(struct dentry *dentry, struct kstatfs *statp)
ZFS_EXIT(zfsvfs);
return (0);
}
-EXPORT_SYMBOL(zfs_statvfs);
int
zfs_root(zfsvfs_t *zfsvfs, struct inode **ipp)
@@ -1137,7 +1123,6 @@ zfs_root(zfsvfs_t *zfsvfs, struct inode **ipp)
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_root);
#ifdef HAVE_D_PRUNE_ALIASES
/*
@@ -1150,7 +1135,7 @@ EXPORT_SYMBOL(zfs_root);
* end of the list so we're always scanning the oldest znodes first.
*/
static int
-zfs_sb_prune_aliases(zfsvfs_t *zfsvfs, unsigned long nr_to_scan)
+zfs_prune_aliases(zfsvfs_t *zfsvfs, unsigned long nr_to_scan)
{
znode_t **zp_array, *zp;
int max_array = MIN(nr_to_scan, PAGE_SIZE * 8 / sizeof (znode_t *));
@@ -1205,7 +1190,7 @@ zfs_sb_prune_aliases(zfsvfs_t *zfsvfs, unsigned long nr_to_scan)
* blocks but can't because they are all pinned by entries in these caches.
*/
int
-zfs_sb_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects)
+zfs_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects)
{
zfsvfs_t *zfsvfs = sb->s_fs_info;
int error = 0;
@@ -1237,7 +1222,7 @@ zfs_sb_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects)
*objects = (*shrinker->shrink)(shrinker, &sc);
#elif defined(HAVE_D_PRUNE_ALIASES)
#define D_PRUNE_ALIASES_IS_DEFAULT
- *objects = zfs_sb_prune_aliases(zfsvfs, nr_to_scan);
+ *objects = zfs_prune_aliases(zfsvfs, nr_to_scan);
#else
#error "No available dentry and inode cache pruning mechanism."
#endif
@@ -1245,12 +1230,12 @@ zfs_sb_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects)
#if defined(HAVE_D_PRUNE_ALIASES) && !defined(D_PRUNE_ALIASES_IS_DEFAULT)
#undef D_PRUNE_ALIASES_IS_DEFAULT
/*
- * Fall back to zfs_sb_prune_aliases if the kernel's per-superblock
+ * Fall back to zfs_prune_aliases if the kernel's per-superblock
* shrinker couldn't free anything, possibly due to the inodes being
* allocated in a different memcg.
*/
if (*objects == 0)
- *objects = zfs_sb_prune_aliases(zfsvfs, nr_to_scan);
+ *objects = zfs_prune_aliases(zfsvfs, nr_to_scan);
#endif
ZFS_EXIT(zfsvfs);
@@ -1261,7 +1246,6 @@ zfs_sb_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects)
return (error);
}
-EXPORT_SYMBOL(zfs_sb_prune);
/*
* Teardown the zfsvfs_t.
@@ -1269,7 +1253,7 @@ EXPORT_SYMBOL(zfs_sb_prune);
* Note, if 'unmounting' is FALSE, we return with the 'z_teardown_lock'
* and 'z_teardown_inactive_lock' held.
*/
-int
+static int
zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting)
{
znode_t *zp;
@@ -1389,7 +1373,6 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting)
return (0);
}
-EXPORT_SYMBOL(zfsvfs_teardown);
#if !defined(HAVE_2ARGS_BDI_SETUP_AND_REGISTER) && \
!defined(HAVE_3ARGS_BDI_SETUP_AND_REGISTER)
@@ -1405,7 +1388,7 @@ zfs_domount(struct super_block *sb, zfs_mntopts_t *zmo, int silent)
uint64_t recordsize;
int error;
- error = zfs_sb_create(osname, zmo, &zfsvfs);
+ error = zfsvfs_create(osname, zmo, &zfsvfs);
if (error)
return (error);
@@ -1459,7 +1442,7 @@ zfs_domount(struct super_block *sb, zfs_mntopts_t *zmo, int silent)
dmu_objset_set_user(zfsvfs->z_os, zfsvfs);
mutex_exit(&zfsvfs->z_os->os_user_ptr_lock);
} else {
- if ((error = zfs_sb_setup(zfsvfs, B_TRUE)))
+ if ((error = zfsvfs_setup(zfsvfs, B_TRUE)))
goto out;
}
@@ -1485,7 +1468,7 @@ zfs_domount(struct super_block *sb, zfs_mntopts_t *zmo, int silent)
out:
if (error) {
dmu_objset_disown(zfsvfs->z_os, zfsvfs);
- zfs_sb_free(zfsvfs);
+ zfsvfs_free(zfsvfs);
/*
* make sure we don't have dangling sb->s_fs_info which
* zfs_preumount will use.
@@ -1495,7 +1478,6 @@ out:
return (error);
}
-EXPORT_SYMBOL(zfs_domount);
/*
* Called when an unmount is requested and certain sanity checks have
@@ -1533,7 +1515,6 @@ zfs_preumount(struct super_block *sb)
dmu_objset_pool(zfsvfs->z_os)), 0);
}
}
-EXPORT_SYMBOL(zfs_preumount);
/*
* Called once all other unmount released tear down has occurred.
@@ -1569,10 +1550,9 @@ zfs_umount(struct super_block *sb)
dmu_objset_disown(os, zfsvfs);
}
- zfs_sb_free(zfsvfs);
+ zfsvfs_free(zfsvfs);
return (0);
}
-EXPORT_SYMBOL(zfs_umount);
int
zfs_remount(struct super_block *sb, int *flags, zfs_mntopts_t *zmo)
@@ -1585,7 +1565,6 @@ zfs_remount(struct super_block *sb, int *flags, zfs_mntopts_t *zmo)
return (error);
}
-EXPORT_SYMBOL(zfs_remount);
int
zfs_vget(struct super_block *sb, struct inode **ipp, fid_t *fidp)
@@ -1694,7 +1673,6 @@ zfs_vget(struct super_block *sb, struct inode **ipp, fid_t *fidp)
ZFS_EXIT(zfsvfs);
return (0);
}
-EXPORT_SYMBOL(zfs_vget);
/*
* Block out VFS ops and close zfsvfs_t
@@ -1714,7 +1692,6 @@ zfs_suspend_fs(zfsvfs_t *zfsvfs)
return (0);
}
-EXPORT_SYMBOL(zfs_suspend_fs);
/*
* Reopen zfsvfs_t and release VFS ops.
@@ -1761,7 +1738,7 @@ zfs_resume_fs(zfsvfs_t *zfsvfs, dsl_dataset_t *ds)
sa_register_update_callback(zfsvfs->z_os,
zfs_sa_upgrade);
- VERIFY(zfs_sb_setup(zfsvfs, B_FALSE) == 0);
+ VERIFY(zfsvfs_setup(zfsvfs, B_FALSE) == 0);
zfs_set_fuid_feature(zfsvfs);
zfsvfs->z_rollback_time = jiffies;
@@ -1801,7 +1778,6 @@ bail:
}
return (err);
}
-EXPORT_SYMBOL(zfs_resume_fs);
int
zfs_set_version(zfsvfs_t *zfsvfs, uint64_t newvers)
@@ -1868,7 +1844,6 @@ zfs_set_version(zfsvfs_t *zfsvfs, uint64_t newvers)
return (0);
}
-EXPORT_SYMBOL(zfs_set_version);
/*
* Read a property stored within the master node.
@@ -1914,7 +1889,6 @@ zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value)
}
return (error);
}
-EXPORT_SYMBOL(zfs_get_zplprop);
/*
* Return true if the coresponding vfs's unmounted flag is set.
@@ -1959,3 +1933,25 @@ zfs_fini(void)
zfs_znode_fini();
zfsctl_fini();
}
+
+#if defined(_KERNEL) && defined(HAVE_SPL)
+EXPORT_SYMBOL(zfs_suspend_fs);
+EXPORT_SYMBOL(zfs_resume_fs);
+EXPORT_SYMBOL(zfs_userspace_one);
+EXPORT_SYMBOL(zfs_userspace_many);
+EXPORT_SYMBOL(zfs_set_userquota);
+EXPORT_SYMBOL(zfs_owner_overquota);
+EXPORT_SYMBOL(zfs_fuid_overquota);
+EXPORT_SYMBOL(zfs_fuid_overobjquota);
+EXPORT_SYMBOL(zfs_set_version);
+EXPORT_SYMBOL(zfsvfs_create);
+EXPORT_SYMBOL(zfsvfs_free);
+EXPORT_SYMBOL(zfs_is_readonly);
+EXPORT_SYMBOL(zfs_domount);
+EXPORT_SYMBOL(zfs_preumount);
+EXPORT_SYMBOL(zfs_umount);
+EXPORT_SYMBOL(zfs_remount);
+EXPORT_SYMBOL(zfs_statvfs);
+EXPORT_SYMBOL(zfs_vget);
+EXPORT_SYMBOL(zfs_prune);
+#endif
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
index ade1372ed..4afae6c36 100644
--- a/module/zfs/zfs_vnops.c
+++ b/module/zfs/zfs_vnops.c
@@ -226,7 +226,6 @@ zfs_open(struct inode *ip, int mode, int flag, cred_t *cr)
ZFS_EXIT(zfsvfs);
return (0);
}
-EXPORT_SYMBOL(zfs_open);
/* ARGSUSED */
int
@@ -249,7 +248,6 @@ zfs_close(struct inode *ip, int flag, cred_t *cr)
ZFS_EXIT(zfsvfs);
return (0);
}
-EXPORT_SYMBOL(zfs_close);
#if defined(SEEK_HOLE) && defined(SEEK_DATA)
/*
@@ -313,7 +311,6 @@ zfs_holey(struct inode *ip, int cmd, loff_t *off)
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_holey);
#endif /* SEEK_HOLE && SEEK_DATA */
#if defined(_KERNEL)
@@ -556,7 +553,6 @@ out:
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_read);
/*
* Write the bytes to a file.
@@ -938,7 +934,6 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
ZFS_EXIT(zfsvfs);
return (0);
}
-EXPORT_SYMBOL(zfs_write);
/*
* Drop a reference on the passed inode asynchronously. This ensures
@@ -1132,7 +1127,6 @@ zfs_access(struct inode *ip, int mode, int flag, cred_t *cr)
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_access);
/*
* Lookup an entry in a directory, or an extended attribute directory.
@@ -1271,7 +1265,6 @@ zfs_lookup(struct inode *dip, char *nm, struct inode **ipp, int flags,
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_lookup);
/*
* Attempt to create a new entry in a directory. If the entry
@@ -1524,7 +1517,6 @@ out:
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_create);
/* ARGSUSED */
int
@@ -1888,7 +1880,6 @@ out:
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_remove);
/*
* Create a new directory and insert it into dip using the name
@@ -2071,7 +2062,6 @@ top:
ZFS_EXIT(zfsvfs);
return (0);
}
-EXPORT_SYMBOL(zfs_mkdir);
/*
* Remove a directory subdir entry. If the current working
@@ -2205,7 +2195,6 @@ out:
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_rmdir);
/*
* Read as many directory entries as will fit into the provided
@@ -2367,7 +2356,6 @@ out:
return (error);
}
-EXPORT_SYMBOL(zfs_readdir);
ulong_t zfs_fsync_sync_cnt = 4;
@@ -2389,7 +2377,6 @@ zfs_fsync(struct inode *ip, int syncflag, cred_t *cr)
return (0);
}
-EXPORT_SYMBOL(zfs_fsync);
/*
@@ -2593,7 +2580,6 @@ zfs_getattr(struct inode *ip, vattr_t *vap, int flags, cred_t *cr)
ZFS_EXIT(zfsvfs);
return (0);
}
-EXPORT_SYMBOL(zfs_getattr);
/*
* Get the basic file attributes and place them in the provided kstat
@@ -2650,7 +2636,6 @@ zfs_getattr_fast(struct inode *ip, struct kstat *sp)
return (0);
}
-EXPORT_SYMBOL(zfs_getattr_fast);
/*
* Set the file attributes to the values contained in the
@@ -3281,7 +3266,6 @@ out3:
ZFS_EXIT(zfsvfs);
return (err);
}
-EXPORT_SYMBOL(zfs_setattr);
typedef struct zfs_zlock {
krwlock_t *zl_rwlock; /* lock we acquired */
@@ -3725,7 +3709,6 @@ out:
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_rename);
/*
* Insert the indicated symbolic reference entry into the directory.
@@ -3888,7 +3871,6 @@ top:
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_symlink);
/*
* Return, in the buffer contained in the provided uio structure,
@@ -3926,7 +3908,6 @@ zfs_readlink(struct inode *ip, uio_t *uio, cred_t *cr)
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_readlink);
/*
* Insert a new entry into directory tdip referencing sip.
@@ -4110,7 +4091,6 @@ top:
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_link);
static void
zfs_putpage_commit_cb(void *arg)
@@ -4378,7 +4358,6 @@ out:
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_dirty_inode);
/*ARGSUSED*/
void
@@ -4424,7 +4403,6 @@ zfs_inactive(struct inode *ip)
if (need_unlock)
rw_exit(&zfsvfs->z_teardown_inactive_lock);
}
-EXPORT_SYMBOL(zfs_inactive);
/*
* Bounds-check the seek operation.
@@ -4445,7 +4423,6 @@ zfs_seek(struct inode *ip, offset_t ooff, offset_t *noffp)
return (0);
return ((*noffp < 0 || *noffp > MAXOFFSET_T) ? EINVAL : 0);
}
-EXPORT_SYMBOL(zfs_seek);
/*
* Fill pages with data from the disk.
@@ -4525,7 +4502,6 @@ zfs_getpage(struct inode *ip, struct page *pl[], int nr_pages)
ZFS_EXIT(zfsvfs);
return (err);
}
-EXPORT_SYMBOL(zfs_getpage);
/*
* Check ZFS specific permissions to memory map a section of a file.
@@ -4570,7 +4546,6 @@ zfs_map(struct inode *ip, offset_t off, caddr_t *addrp, size_t len,
ZFS_EXIT(zfsvfs);
return (0);
}
-EXPORT_SYMBOL(zfs_map);
/*
* convoff - converts the given data (start, whence) to the
@@ -4694,7 +4669,6 @@ zfs_space(struct inode *ip, int cmd, flock64_t *bfp, int flag,
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_space);
/*ARGSUSED*/
int
@@ -4737,7 +4711,6 @@ zfs_fid(struct inode *ip, fid_t *fidp)
ZFS_EXIT(zfsvfs);
return (0);
}
-EXPORT_SYMBOL(zfs_fid);
/*ARGSUSED*/
int
@@ -4755,7 +4728,6 @@ zfs_getsecattr(struct inode *ip, vsecattr_t *vsecp, int flag, cred_t *cr)
return (error);
}
-EXPORT_SYMBOL(zfs_getsecattr);
/*ARGSUSED*/
int
@@ -4778,7 +4750,6 @@ zfs_setsecattr(struct inode *ip, vsecattr_t *vsecp, int flag, cred_t *cr)
ZFS_EXIT(zfsvfs);
return (error);
}
-EXPORT_SYMBOL(zfs_setsecattr);
#ifdef HAVE_UIO_ZEROCOPY
/*
@@ -4937,6 +4908,36 @@ zfs_retzcbuf(struct inode *ip, xuio_t *xuio, cred_t *cr)
#endif /* HAVE_UIO_ZEROCOPY */
#if defined(_KERNEL) && defined(HAVE_SPL)
+EXPORT_SYMBOL(zfs_open);
+EXPORT_SYMBOL(zfs_close);
+EXPORT_SYMBOL(zfs_read);
+EXPORT_SYMBOL(zfs_write);
+EXPORT_SYMBOL(zfs_access);
+EXPORT_SYMBOL(zfs_lookup);
+EXPORT_SYMBOL(zfs_create);
+EXPORT_SYMBOL(zfs_tmpfile);
+EXPORT_SYMBOL(zfs_remove);
+EXPORT_SYMBOL(zfs_mkdir);
+EXPORT_SYMBOL(zfs_rmdir);
+EXPORT_SYMBOL(zfs_readdir);
+EXPORT_SYMBOL(zfs_fsync);
+EXPORT_SYMBOL(zfs_getattr);
+EXPORT_SYMBOL(zfs_getattr_fast);
+EXPORT_SYMBOL(zfs_setattr);
+EXPORT_SYMBOL(zfs_rename);
+EXPORT_SYMBOL(zfs_symlink);
+EXPORT_SYMBOL(zfs_readlink);
+EXPORT_SYMBOL(zfs_link);
+EXPORT_SYMBOL(zfs_inactive);
+EXPORT_SYMBOL(zfs_space);
+EXPORT_SYMBOL(zfs_fid);
+EXPORT_SYMBOL(zfs_getsecattr);
+EXPORT_SYMBOL(zfs_setsecattr);
+EXPORT_SYMBOL(zfs_getpage);
+EXPORT_SYMBOL(zfs_putpage);
+EXPORT_SYMBOL(zfs_dirty_inode);
+EXPORT_SYMBOL(zfs_map);
+
/* CSTYLED */
module_param(zfs_delete_blocks, ulong, 0644);
MODULE_PARM_DESC(zfs_delete_blocks, "Delete files larger than N blocks async");
diff --git a/module/zfs/zpl_super.c b/module/zfs/zpl_super.c
index f45d068ba..16017ff44 100644
--- a/module/zfs/zpl_super.c
+++ b/module/zfs/zpl_super.c
@@ -495,7 +495,7 @@ zpl_prune_sb(int64_t nr_to_scan, void *arg)
struct super_block *sb = (struct super_block *)arg;
int objects = 0;
- (void) -zfs_sb_prune(sb, nr_to_scan, &objects);
+ (void) -zfs_prune(sb, nr_to_scan, &objects);
}
#ifdef HAVE_NR_CACHED_OBJECTS