aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2011-04-26 13:50:11 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2011-04-26 13:50:11 +0000
commit541cb7a358c80d4641f19d58ef00dcfd7e9f732c (patch)
tree1c2e6a28e9428a827876b31682f28917da19ab42 /sys/fs
parentc3bd10b434e16d881a04dfb5c67c5a845aaff661 (diff)
downloadsrc-541cb7a358c80d4641f19d58ef00dcfd7e9f732c.tar.gz
src-541cb7a358c80d4641f19d58ef00dcfd7e9f732c.zip
Fix a kernel linking problem introduced by r221032, r221040
when building kernels that don't have "options NFS_ROOT" specified. I plan on moving the functions that use these data structures into the shared code in sys/nfs/nfs_diskless.c in a future commit. At that time, these definitions will no longer be needed in nfs_vfsops.c and nfs_clvfsops.c. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=221066
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsclient/nfs_clvfsops.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c
index 6ed94ba0d592..3d044e4004ed 100644
--- a/sys/fs/nfsclient/nfs_clvfsops.c
+++ b/sys/fs/nfsclient/nfs_clvfsops.c
@@ -137,10 +137,17 @@ VFS_SET(nfs_vfsops, newnfs, VFCF_NETWORK);
MODULE_VERSION(newnfs, 1);
/*
- * This structure must be filled in by a primary bootstrap or bootstrap
- * server for a diskless/dataless machine. It is initialized below just
- * to ensure that it is allocated to initialized data (.data not .bss).
+ * This structure is now defined in sys/nfs/nfs_diskless.c so that it
+ * can be shared by both NFS clients. It is declared here so that it
+ * will be defined for kernels built without NFS_ROOT, although it
+ * isn't used in that case.
*/
+#if !defined(NFS_ROOT) && !defined(NFSCLIENT)
+struct nfs_diskless nfs_diskless = { { { 0 } } };
+struct nfsv3_diskless nfsv3_diskless = { { { 0 } } };
+int nfs_diskless_valid = 0;
+#endif
+
SYSCTL_INT(_vfs_newnfs, OID_AUTO, diskless_valid, CTLFLAG_RD,
&nfs_diskless_valid, 0,
"Has the diskless struct been filled correctly");