Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133100876
D42672.id130322.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42672.id130322.diff
View Options
diff --git a/sys/kern/vfs_mount.c.zfssnap b/sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c.zfssnap
+++ b/sys/kern/vfs_mount.c
@@ -3141,3 +3141,29 @@
}
mtx_unlock(&mountlist_mtx);
}
+
+/*
+ * Clone the mnt_exjail field to a new mount point.
+ */
+void
+vfs_exjail_clone(struct mount *inmp, struct mount *outmp)
+{
+ struct ucred *cr;
+
+ MNT_ILOCK(inmp);
+ cr = inmp->mnt_exjail;
+ if (cr != NULL) {
+ crhold(cr);
+ MNT_IUNLOCK(inmp);
+ MNT_ILOCK(outmp);
+ if (outmp->mnt_exjail == NULL) {
+ outmp->mnt_exjail = cr;
+ atomic_add_int(&cr->cr_prison->pr_exportcnt, 1);
+ cr = NULL;
+ }
+ MNT_IUNLOCK(outmp);
+ if (cr != NULL)
+ crfree(cr);
+ } else
+ MNT_IUNLOCK(inmp);
+}
diff --git a/sys/sys/mount.h.zfssnap b/sys/sys/mount.h
--- a/sys/sys/mount.h.zfssnap
+++ b/sys/sys/mount.h
@@ -1017,6 +1017,7 @@
(struct mount *, struct netexport *, struct export_args *);
void vfs_periodic(struct mount *, int);
int vfs_busy(struct mount *, int);
+void vfs_exjail_clone(struct mount *, struct mount *);
void vfs_exjail_delete(struct prison *);
int vfs_export /* process mount export info */
(struct mount *, struct export_args *, bool);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 23, 11:50 PM (1 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24108291
Default Alt Text
D42672.id130322.diff (1 KB)
Attached To
Mode
D42672: Fix ZFS so that it sets mnt_exjail for snapshot automounts
Attached
Detach File
Event Timeline
Log In to Comment