diff options
author | Christoph Hellwig <hch@lst.de> | 2014-05-06 13:37:13 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-05-06 17:54:53 -0400 |
commit | 9c69de4c94fcb11db919160d5fa0b48f13d1757a (patch) | |
tree | 84ab9298f94f718d5cef937ca3987ab3a8cb1379 | |
parent | 4dd86e150f63a6c360783f163a979ec563e6d570 (diff) |
nfsd: remove <linux/nfsd/nfsfh.h>
The only real user of this header is fs/nfsd/nfsfh.h, so merge the
two. Various lockѕ source files used it to indirectly get other
sunrpc or nfs headers, so fix those up.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | fs/lockd/clnt4xdr.c | 2 | ||||
-rw-r--r-- | fs/lockd/clntxdr.c | 2 | ||||
-rw-r--r-- | fs/lockd/svcsubs.c | 2 | ||||
-rw-r--r-- | fs/lockd/xdr.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfsd.h | 1 | ||||
-rw-r--r-- | fs/nfsd/nfsfh.h | 59 | ||||
-rw-r--r-- | fs/nfsd/state.h | 1 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 2 | ||||
-rw-r--r-- | include/linux/nfsd/export.h | 6 | ||||
-rw-r--r-- | include/linux/nfsd/nfsfh.h | 63 |
10 files changed, 68 insertions, 72 deletions
diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c index 00ec0b9c94d1..d3e40db28930 100644 --- a/fs/lockd/clnt4xdr.c +++ b/fs/lockd/clnt4xdr.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/sunrpc/stats.h> | 14 | #include <linux/sunrpc/stats.h> |
15 | #include <linux/lockd/lockd.h> | 15 | #include <linux/lockd/lockd.h> |
16 | 16 | ||
17 | #include <uapi/linux/nfs3.h> | ||
18 | |||
17 | #define NLMDBG_FACILITY NLMDBG_XDR | 19 | #define NLMDBG_FACILITY NLMDBG_XDR |
18 | 20 | ||
19 | #if (NLMCLNT_OHSIZE > XDR_MAX_NETOBJ) | 21 | #if (NLMCLNT_OHSIZE > XDR_MAX_NETOBJ) |
diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c index 9a55797a1cd4..3e9f7874b975 100644 --- a/fs/lockd/clntxdr.c +++ b/fs/lockd/clntxdr.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/sunrpc/stats.h> | 15 | #include <linux/sunrpc/stats.h> |
16 | #include <linux/lockd/lockd.h> | 16 | #include <linux/lockd/lockd.h> |
17 | 17 | ||
18 | #include <uapi/linux/nfs2.h> | ||
19 | |||
18 | #define NLMDBG_FACILITY NLMDBG_XDR | 20 | #define NLMDBG_FACILITY NLMDBG_XDR |
19 | 21 | ||
20 | #if (NLMCLNT_OHSIZE > XDR_MAX_NETOBJ) | 22 | #if (NLMCLNT_OHSIZE > XDR_MAX_NETOBJ) |
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index dc5c75930f0f..7ec6b1074d8c 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c | |||
@@ -14,12 +14,12 @@ | |||
14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
15 | #include <linux/sunrpc/svc.h> | 15 | #include <linux/sunrpc/svc.h> |
16 | #include <linux/sunrpc/addr.h> | 16 | #include <linux/sunrpc/addr.h> |
17 | #include <linux/nfsd/nfsfh.h> | ||
18 | #include <linux/nfsd/export.h> | 17 | #include <linux/nfsd/export.h> |
19 | #include <linux/lockd/lockd.h> | 18 | #include <linux/lockd/lockd.h> |
20 | #include <linux/lockd/share.h> | 19 | #include <linux/lockd/share.h> |
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/mount.h> | 21 | #include <linux/mount.h> |
22 | #include <uapi/linux/nfs2.h> | ||
23 | 23 | ||
24 | #define NLMDBG_FACILITY NLMDBG_SVCSUBS | 24 | #define NLMDBG_FACILITY NLMDBG_SVCSUBS |
25 | 25 | ||
diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 964666c68a86..9340e7e10ef6 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/sunrpc/stats.h> | 16 | #include <linux/sunrpc/stats.h> |
17 | #include <linux/lockd/lockd.h> | 17 | #include <linux/lockd/lockd.h> |
18 | 18 | ||
19 | #include <uapi/linux/nfs2.h> | ||
20 | |||
19 | #define NLMDBG_FACILITY NLMDBG_XDR | 21 | #define NLMDBG_FACILITY NLMDBG_XDR |
20 | 22 | ||
21 | 23 | ||
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h index 479eb681c27c..7d5c310678d0 100644 --- a/fs/nfsd/nfsd.h +++ b/fs/nfsd/nfsd.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/nfs2.h> | 15 | #include <linux/nfs2.h> |
16 | #include <linux/nfs3.h> | 16 | #include <linux/nfs3.h> |
17 | #include <linux/nfs4.h> | 17 | #include <linux/nfs4.h> |
18 | #include <linux/sunrpc/svc.h> | ||
18 | #include <linux/sunrpc/msg_prot.h> | 19 | #include <linux/sunrpc/msg_prot.h> |
19 | 20 | ||
20 | #include <linux/nfsd/debug.h> | 21 | #include <linux/nfsd/debug.h> |
diff --git a/fs/nfsd/nfsfh.h b/fs/nfsd/nfsfh.h index ad67964d0bb1..2e89e70ac15c 100644 --- a/fs/nfsd/nfsfh.h +++ b/fs/nfsd/nfsfh.h | |||
@@ -1,9 +1,58 @@ | |||
1 | /* Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> */ | 1 | /* |
2 | * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> | ||
3 | * | ||
4 | * This file describes the layout of the file handles as passed | ||
5 | * over the wire. | ||
6 | */ | ||
7 | #ifndef _LINUX_NFSD_NFSFH_H | ||
8 | #define _LINUX_NFSD_NFSFH_H | ||
9 | |||
10 | #include <linux/sunrpc/svc.h> | ||
11 | #include <uapi/linux/nfsd/nfsfh.h> | ||
12 | |||
13 | static inline __u32 ino_t_to_u32(ino_t ino) | ||
14 | { | ||
15 | return (__u32) ino; | ||
16 | } | ||
17 | |||
18 | static inline ino_t u32_to_ino_t(__u32 uino) | ||
19 | { | ||
20 | return (ino_t) uino; | ||
21 | } | ||
2 | 22 | ||
3 | #ifndef _LINUX_NFSD_FH_INT_H | 23 | /* |
4 | #define _LINUX_NFSD_FH_INT_H | 24 | * This is the internal representation of an NFS handle used in knfsd. |
25 | * pre_mtime/post_version will be used to support wcc_attr's in NFSv3. | ||
26 | */ | ||
27 | typedef struct svc_fh { | ||
28 | struct knfsd_fh fh_handle; /* FH data */ | ||
29 | struct dentry * fh_dentry; /* validated dentry */ | ||
30 | struct svc_export * fh_export; /* export pointer */ | ||
31 | int fh_maxsize; /* max size for fh_handle */ | ||
32 | |||
33 | unsigned char fh_locked; /* inode locked by us */ | ||
34 | unsigned char fh_want_write; /* remount protection taken */ | ||
35 | |||
36 | #ifdef CONFIG_NFSD_V3 | ||
37 | unsigned char fh_post_saved; /* post-op attrs saved */ | ||
38 | unsigned char fh_pre_saved; /* pre-op attrs saved */ | ||
39 | |||
40 | /* Pre-op attributes saved during fh_lock */ | ||
41 | __u64 fh_pre_size; /* size before operation */ | ||
42 | struct timespec fh_pre_mtime; /* mtime before oper */ | ||
43 | struct timespec fh_pre_ctime; /* ctime before oper */ | ||
44 | /* | ||
45 | * pre-op nfsv4 change attr: note must check IS_I_VERSION(inode) | ||
46 | * to find out if it is valid. | ||
47 | */ | ||
48 | u64 fh_pre_change; | ||
49 | |||
50 | /* Post-op attributes saved in fh_unlock */ | ||
51 | struct kstat fh_post_attr; /* full attrs after operation */ | ||
52 | u64 fh_post_change; /* nfsv4 change; see above */ | ||
53 | #endif /* CONFIG_NFSD_V3 */ | ||
5 | 54 | ||
6 | #include <linux/nfsd/nfsfh.h> | 55 | } svc_fh; |
7 | 56 | ||
8 | enum nfsd_fsid { | 57 | enum nfsd_fsid { |
9 | FSID_DEV = 0, | 58 | FSID_DEV = 0, |
@@ -215,4 +264,4 @@ fh_unlock(struct svc_fh *fhp) | |||
215 | } | 264 | } |
216 | } | 265 | } |
217 | 266 | ||
218 | #endif /* _LINUX_NFSD_FH_INT_H */ | 267 | #endif /* _LINUX_NFSD_NFSFH_H */ |
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index 424d8f5f2317..5b3bbf24097c 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include <linux/idr.h> | 38 | #include <linux/idr.h> |
39 | #include <linux/sunrpc/svc_xprt.h> | 39 | #include <linux/sunrpc/svc_xprt.h> |
40 | #include <linux/nfsd/nfsfh.h> | ||
41 | #include "nfsfh.h" | 40 | #include "nfsfh.h" |
42 | 41 | ||
43 | typedef struct { | 42 | typedef struct { |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index dcaad79f54ed..219d79627c05 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -17,13 +17,13 @@ | |||
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/kref.h> | 18 | #include <linux/kref.h> |
19 | #include <linux/utsname.h> | 19 | #include <linux/utsname.h> |
20 | #include <linux/nfsd/nfsfh.h> | ||
21 | #include <linux/lockd/bind.h> | 20 | #include <linux/lockd/bind.h> |
22 | #include <linux/lockd/xdr.h> | 21 | #include <linux/lockd/xdr.h> |
23 | #ifdef CONFIG_LOCKD_V4 | 22 | #ifdef CONFIG_LOCKD_V4 |
24 | #include <linux/lockd/xdr4.h> | 23 | #include <linux/lockd/xdr4.h> |
25 | #endif | 24 | #endif |
26 | #include <linux/lockd/debug.h> | 25 | #include <linux/lockd/debug.h> |
26 | #include <linux/sunrpc/svc.h> | ||
27 | 27 | ||
28 | /* | 28 | /* |
29 | * Version string | 29 | * Version string |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 7898c997dfea..b12c4e526ef2 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -9,9 +9,13 @@ | |||
9 | #ifndef NFSD_EXPORT_H | 9 | #ifndef NFSD_EXPORT_H |
10 | #define NFSD_EXPORT_H | 10 | #define NFSD_EXPORT_H |
11 | 11 | ||
12 | # include <linux/nfsd/nfsfh.h> | 12 | #include <linux/sunrpc/cache.h> |
13 | #include <uapi/linux/nfsd/export.h> | 13 | #include <uapi/linux/nfsd/export.h> |
14 | 14 | ||
15 | struct knfsd_fh; | ||
16 | struct svc_fh; | ||
17 | struct svc_rqst; | ||
18 | |||
15 | /* | 19 | /* |
16 | * FS Locations | 20 | * FS Locations |
17 | */ | 21 | */ |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h deleted file mode 100644 index a93593f1fa4e..000000000000 --- a/include/linux/nfsd/nfsfh.h +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * include/linux/nfsd/nfsfh.h | ||
3 | * | ||
4 | * This file describes the layout of the file handles as passed | ||
5 | * over the wire. | ||
6 | * | ||
7 | * Earlier versions of knfsd used to sign file handles using keyed MD5 | ||
8 | * or SHA. I've removed this code, because it doesn't give you more | ||
9 | * security than blocking external access to port 2049 on your firewall. | ||
10 | * | ||
11 | * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> | ||
12 | */ | ||
13 | #ifndef _LINUX_NFSD_FH_H | ||
14 | #define _LINUX_NFSD_FH_H | ||
15 | |||
16 | # include <linux/sunrpc/svc.h> | ||
17 | #include <uapi/linux/nfsd/nfsfh.h> | ||
18 | |||
19 | static inline __u32 ino_t_to_u32(ino_t ino) | ||
20 | { | ||
21 | return (__u32) ino; | ||
22 | } | ||
23 | |||
24 | static inline ino_t u32_to_ino_t(__u32 uino) | ||
25 | { | ||
26 | return (ino_t) uino; | ||
27 | } | ||
28 | |||
29 | /* | ||
30 | * This is the internal representation of an NFS handle used in knfsd. | ||
31 | * pre_mtime/post_version will be used to support wcc_attr's in NFSv3. | ||
32 | */ | ||
33 | typedef struct svc_fh { | ||
34 | struct knfsd_fh fh_handle; /* FH data */ | ||
35 | struct dentry * fh_dentry; /* validated dentry */ | ||
36 | struct svc_export * fh_export; /* export pointer */ | ||
37 | int fh_maxsize; /* max size for fh_handle */ | ||
38 | |||
39 | unsigned char fh_locked; /* inode locked by us */ | ||
40 | unsigned char fh_want_write; /* remount protection taken */ | ||
41 | |||
42 | #ifdef CONFIG_NFSD_V3 | ||
43 | unsigned char fh_post_saved; /* post-op attrs saved */ | ||
44 | unsigned char fh_pre_saved; /* pre-op attrs saved */ | ||
45 | |||
46 | /* Pre-op attributes saved during fh_lock */ | ||
47 | __u64 fh_pre_size; /* size before operation */ | ||
48 | struct timespec fh_pre_mtime; /* mtime before oper */ | ||
49 | struct timespec fh_pre_ctime; /* ctime before oper */ | ||
50 | /* | ||
51 | * pre-op nfsv4 change attr: note must check IS_I_VERSION(inode) | ||
52 | * to find out if it is valid. | ||
53 | */ | ||
54 | u64 fh_pre_change; | ||
55 | |||
56 | /* Post-op attributes saved in fh_unlock */ | ||
57 | struct kstat fh_post_attr; /* full attrs after operation */ | ||
58 | u64 fh_post_change; /* nfsv4 change; see above */ | ||
59 | #endif /* CONFIG_NFSD_V3 */ | ||
60 | |||
61 | } svc_fh; | ||
62 | |||
63 | #endif /* _LINUX_NFSD_FH_H */ | ||