2020-05-29 12:38:52

by Anupam Aggarwal

[permalink] [raw]
Subject: [PATCH] init: include nfs header files when CONFIG_ROOT_NFS is enabled

Move inclusion of header files linux/nfs_fs.h, linux/nfs_fs_sb.h &
linux/nfs_mount.h under config CONFIG_ROOT_NFS

Signed-off-by: Anupam Aggarwal <[email protected]>
Signed-off-by: Vivek Trivedi <[email protected]>
Signed-off-by: Amit Sahrawat <[email protected]>
---
init/do_mounts.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index 29d326b..02baec4 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -20,9 +20,11 @@
#include <linux/ramfs.h>
#include <linux/shmem_fs.h>

+#ifdef CONFIG_ROOT_NFS
#include <linux/nfs_fs.h>
#include <linux/nfs_fs_sb.h>
#include <linux/nfs_mount.h>
+#endif
#include <uapi/linux/mount.h>

#include "do_mounts.h"
--
1.9.1