aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-12-06 23:40:23 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:45 -0500
commit3ee6f61ca0720c71086a9eaf3f5bd0f7c51fe139 (patch)
tree4f290297869bfacecee7e849cc1bbbe1aec1f15a
parent219576e127c4f7770aa985f719e815936bc54367 (diff)
[PATCH] remove NFSD_OPTIMIZE_SPACE
This patch removes the unused NFSD_OPTIMIZE_SPACE. Additionally, it does differently what NFSD_OPTIMIZE_SPACE was supposed to do: Nowadays, gcc knows best when to inline code, and CONFIG_CC_OPTIMIZE_FOR_SIZE even tells gcc globally whether to optimize for size or for speed. Therefore, this patch also removes all inline's from these files. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/nfsd/nfs3xdr.c24
-rw-r--r--fs/nfsd/nfsxdr.c13
2 files changed, 14 insertions, 23 deletions
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index b4baca3053c3..277df40f098d 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -24,10 +24,6 @@
24 24
25#define NFSDDBG_FACILITY NFSDDBG_XDR 25#define NFSDDBG_FACILITY NFSDDBG_XDR
26 26
27#ifdef NFSD_OPTIMIZE_SPACE
28# define inline
29#endif
30
31 27
32/* 28/*
33 * Mapping of S_IF* types to NFS file types 29 * Mapping of S_IF* types to NFS file types
@@ -42,14 +38,14 @@ static u32 nfs3_ftypes[] = {
42/* 38/*
43 * XDR functions for basic NFS types 39 * XDR functions for basic NFS types
44 */ 40 */
45static inline __be32 * 41static __be32 *
46encode_time3(__be32 *p, struct timespec *time) 42encode_time3(__be32 *p, struct timespec *time)
47{ 43{
48 *p++ = htonl((u32) time->tv_sec); *p++ = htonl(time->tv_nsec); 44 *p++ = htonl((u32) time->tv_sec); *p++ = htonl(time->tv_nsec);
49 return p; 45 return p;
50} 46}
51 47
52static inline __be32 * 48static __be32 *
53decode_time3(__be32 *p, struct timespec *time) 49decode_time3(__be32 *p, struct timespec *time)
54{ 50{
55 time->tv_sec = ntohl(*p++); 51 time->tv_sec = ntohl(*p++);
@@ -57,7 +53,7 @@ decode_time3(__be32 *p, struct timespec *time)
57 return p; 53 return p;
58} 54}
59 55
60static inline __be32 * 56static __be32 *
61decode_fh(__be32 *p, struct svc_fh *fhp) 57decode_fh(__be32 *p, struct svc_fh *fhp)
62{ 58{
63 unsigned int size; 59 unsigned int size;
@@ -77,7 +73,7 @@ __be32 *nfs3svc_decode_fh(__be32 *p, struct svc_fh *fhp)
77 return decode_fh(p, fhp); 73 return decode_fh(p, fhp);
78} 74}
79 75
80static inline __be32 * 76static __be32 *
81encode_fh(__be32 *p, struct svc_fh *fhp) 77encode_fh(__be32 *p, struct svc_fh *fhp)
82{ 78{
83 unsigned int size = fhp->fh_handle.fh_size; 79 unsigned int size = fhp->fh_handle.fh_size;
@@ -91,7 +87,7 @@ encode_fh(__be32 *p, struct svc_fh *fhp)
91 * Decode a file name and make sure that the path contains 87 * Decode a file name and make sure that the path contains
92 * no slashes or null bytes. 88 * no slashes or null bytes.
93 */ 89 */
94static inline __be32 * 90static __be32 *
95decode_filename(__be32 *p, char **namp, int *lenp) 91decode_filename(__be32 *p, char **namp, int *lenp)
96{ 92{
97 char *name; 93 char *name;
@@ -107,7 +103,7 @@ decode_filename(__be32 *p, char **namp, int *lenp)
107 return p; 103 return p;
108} 104}
109 105
110static inline __be32 * 106static __be32 *
111decode_sattr3(__be32 *p, struct iattr *iap) 107decode_sattr3(__be32 *p, struct iattr *iap)
112{ 108{
113 u32 tmp; 109 u32 tmp;
@@ -153,7 +149,7 @@ decode_sattr3(__be32 *p, struct iattr *iap)
153 return p; 149 return p;
154} 150}
155 151
156static inline __be32 * 152static __be32 *
157encode_fattr3(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, 153encode_fattr3(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp,
158 struct kstat *stat) 154 struct kstat *stat)
159{ 155{
@@ -186,7 +182,7 @@ encode_fattr3(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp,
186 return p; 182 return p;
187} 183}
188 184
189static inline __be32 * 185static __be32 *
190encode_saved_post_attr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp) 186encode_saved_post_attr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp)
191{ 187{
192 struct inode *inode = fhp->fh_dentry->d_inode; 188 struct inode *inode = fhp->fh_dentry->d_inode;
@@ -776,7 +772,7 @@ nfs3svc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p,
776 return xdr_ressize_check(rqstp, p); 772 return xdr_ressize_check(rqstp, p);
777} 773}
778 774
779static inline __be32 * 775static __be32 *
780encode_entry_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name, 776encode_entry_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name,
781 int namlen, ino_t ino) 777 int namlen, ino_t ino)
782{ 778{
@@ -790,7 +786,7 @@ encode_entry_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name,
790 return p; 786 return p;
791} 787}
792 788
793static inline __be32 * 789static __be32 *
794encode_entryplus_baggage(struct nfsd3_readdirres *cd, __be32 *p, 790encode_entryplus_baggage(struct nfsd3_readdirres *cd, __be32 *p,
795 struct svc_fh *fhp) 791 struct svc_fh *fhp)
796{ 792{
diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
index 56ebb1443e0e..f5243f943996 100644
--- a/fs/nfsd/nfsxdr.c
+++ b/fs/nfsd/nfsxdr.c
@@ -18,11 +18,6 @@
18 18
19#define NFSDDBG_FACILITY NFSDDBG_XDR 19#define NFSDDBG_FACILITY NFSDDBG_XDR
20 20
21
22#ifdef NFSD_OPTIMIZE_SPACE
23# define inline
24#endif
25
26/* 21/*
27 * Mapping of S_IF* types to NFS file types 22 * Mapping of S_IF* types to NFS file types
28 */ 23 */
@@ -55,7 +50,7 @@ __be32 *nfs2svc_decode_fh(__be32 *p, struct svc_fh *fhp)
55 return decode_fh(p, fhp); 50 return decode_fh(p, fhp);
56} 51}
57 52
58static inline __be32 * 53static __be32 *
59encode_fh(__be32 *p, struct svc_fh *fhp) 54encode_fh(__be32 *p, struct svc_fh *fhp)
60{ 55{
61 memcpy(p, &fhp->fh_handle.fh_base, NFS_FHSIZE); 56 memcpy(p, &fhp->fh_handle.fh_base, NFS_FHSIZE);
@@ -66,7 +61,7 @@ encode_fh(__be32 *p, struct svc_fh *fhp)
66 * Decode a file name and make sure that the path contains 61 * Decode a file name and make sure that the path contains
67 * no slashes or null bytes. 62 * no slashes or null bytes.
68 */ 63 */
69static inline __be32 * 64static __be32 *
70decode_filename(__be32 *p, char **namp, int *lenp) 65decode_filename(__be32 *p, char **namp, int *lenp)
71{ 66{
72 char *name; 67 char *name;
@@ -82,7 +77,7 @@ decode_filename(__be32 *p, char **namp, int *lenp)
82 return p; 77 return p;
83} 78}
84 79
85static inline __be32 * 80static __be32 *
86decode_pathname(__be32 *p, char **namp, int *lenp) 81decode_pathname(__be32 *p, char **namp, int *lenp)
87{ 82{
88 char *name; 83 char *name;
@@ -98,7 +93,7 @@ decode_pathname(__be32 *p, char **namp, int *lenp)
98 return p; 93 return p;
99} 94}
100 95
101static inline __be32 * 96static __be32 *
102decode_sattr(__be32 *p, struct iattr *iap) 97decode_sattr(__be32 *p, struct iattr *iap)
103{ 98{
104 u32 tmp, tmp1; 99 u32 tmp, tmp1;