diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2020-10-17 00:05:34 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2020-10-17 00:05:34 +0000 |
commit | 0be360124f8f108f73365e31448e7550f877f3ac (patch) | |
tree | 78557e980720fdcfd76497e6630c29ce1688559c /module/os/linux/zfs/zfs_ctldir.c | |
parent | e2228bd99047bb6a0cef0da931147b1f28f155c2 (diff) |
Notes
Diffstat (limited to 'module/os/linux/zfs/zfs_ctldir.c')
-rw-r--r-- | module/os/linux/zfs/zfs_ctldir.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/module/os/linux/zfs/zfs_ctldir.c b/module/os/linux/zfs/zfs_ctldir.c index 26e785a0d422..c13a9771235d 100644 --- a/module/os/linux/zfs/zfs_ctldir.c +++ b/module/os/linux/zfs/zfs_ctldir.c @@ -131,7 +131,7 @@ static void zfsctl_snapshot_unmount_delay_impl(zfs_snapentry_t *se, int delay); * the snapshot name and provided mount point. No reference is taken. */ static zfs_snapentry_t * -zfsctl_snapshot_alloc(char *full_name, char *full_path, spa_t *spa, +zfsctl_snapshot_alloc(const char *full_name, const char *full_path, spa_t *spa, uint64_t objsetid, struct dentry *root_dentry) { zfs_snapentry_t *se; @@ -261,13 +261,13 @@ snapentry_compare_by_objsetid(const void *a, const void *b) * NULL will be returned. */ static zfs_snapentry_t * -zfsctl_snapshot_find_by_name(char *snapname) +zfsctl_snapshot_find_by_name(const char *snapname) { zfs_snapentry_t *se, search; ASSERT(RW_LOCK_HELD(&zfs_snapshot_lock)); - search.se_name = snapname; + search.se_name = (char *)snapname; se = avl_find(&zfs_snapshots_by_name, &search, NULL); if (se) zfsctl_snapshot_hold(se); @@ -301,7 +301,7 @@ zfsctl_snapshot_find_by_objsetid(spa_t *spa, uint64_t objsetid) * removed, renamed, and added back to the new correct location in the tree. */ static int -zfsctl_snapshot_rename(char *old_snapname, char *new_snapname) +zfsctl_snapshot_rename(const char *old_snapname, const char *new_snapname) { zfs_snapentry_t *se; @@ -410,7 +410,7 @@ zfsctl_snapshot_unmount_delay(spa_t *spa, uint64_t objsetid, int delay) * and zero when unmounted. */ static boolean_t -zfsctl_snapshot_ismounted(char *snapname) +zfsctl_snapshot_ismounted(const char *snapname) { zfs_snapentry_t *se; boolean_t ismounted = B_FALSE; @@ -751,7 +751,7 @@ out: * Special case the handling of "..". */ int -zfsctl_root_lookup(struct inode *dip, char *name, struct inode **ipp, +zfsctl_root_lookup(struct inode *dip, const char *name, struct inode **ipp, int flags, cred_t *cr, int *direntflags, pathname_t *realpnp) { zfsvfs_t *zfsvfs = ITOZSB(dip); @@ -784,7 +784,7 @@ zfsctl_root_lookup(struct inode *dip, char *name, struct inode **ipp, * snapshot if it exist, creating the pseudo filesystem inode as necessary. */ int -zfsctl_snapdir_lookup(struct inode *dip, char *name, struct inode **ipp, +zfsctl_snapdir_lookup(struct inode *dip, const char *name, struct inode **ipp, int flags, cred_t *cr, int *direntflags, pathname_t *realpnp) { zfsvfs_t *zfsvfs = ITOZSB(dip); @@ -815,8 +815,8 @@ zfsctl_snapdir_lookup(struct inode *dip, char *name, struct inode **ipp, * to the '.zfs/snapshot' directory snapshots cannot be moved elsewhere. */ int -zfsctl_snapdir_rename(struct inode *sdip, char *snm, - struct inode *tdip, char *tnm, cred_t *cr, int flags) +zfsctl_snapdir_rename(struct inode *sdip, const char *snm, + struct inode *tdip, const char *tnm, cred_t *cr, int flags) { zfsvfs_t *zfsvfs = ITOZSB(sdip); char *to, *from, *real, *fsname; @@ -893,7 +893,8 @@ out: * the removal of the snapshot with the given name. */ int -zfsctl_snapdir_remove(struct inode *dip, char *name, cred_t *cr, int flags) +zfsctl_snapdir_remove(struct inode *dip, const char *name, cred_t *cr, + int flags) { zfsvfs_t *zfsvfs = ITOZSB(dip); char *snapname, *real; @@ -941,7 +942,7 @@ out: * the creation of a new snapshot with the given name. */ int -zfsctl_snapdir_mkdir(struct inode *dip, char *dirname, vattr_t *vap, +zfsctl_snapdir_mkdir(struct inode *dip, const char *dirname, vattr_t *vap, struct inode **ipp, cred_t *cr, int flags) { zfsvfs_t *zfsvfs = ITOZSB(dip); @@ -1001,7 +1002,7 @@ exportfs_flush(void) * it's in use, the unmount will fail harmlessly. */ int -zfsctl_snapshot_unmount(char *snapname, int flags) +zfsctl_snapshot_unmount(const char *snapname, int flags) { char *argv[] = { "/usr/bin/env", "umount", "-t", "zfs", "-n", NULL, NULL }; |