diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-12-06 23:40:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:45 -0500 |
commit | 3ee6f61ca0720c71086a9eaf3f5bd0f7c51fe139 (patch) | |
tree | 4f290297869bfacecee7e849cc1bbbe1aec1f15a /fs/nfsd/nfs3xdr.c | |
parent | 219576e127c4f7770aa985f719e815936bc54367 (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>
Diffstat (limited to 'fs/nfsd/nfs3xdr.c')
-rw-r--r-- | fs/nfsd/nfs3xdr.c | 24 |
1 files changed, 10 insertions, 14 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 | */ |
45 | static inline __be32 * | 41 | static __be32 * |
46 | encode_time3(__be32 *p, struct timespec *time) | 42 | encode_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 | ||
52 | static inline __be32 * | 48 | static __be32 * |
53 | decode_time3(__be32 *p, struct timespec *time) | 49 | decode_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 | ||
60 | static inline __be32 * | 56 | static __be32 * |
61 | decode_fh(__be32 *p, struct svc_fh *fhp) | 57 | decode_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 | ||
80 | static inline __be32 * | 76 | static __be32 * |
81 | encode_fh(__be32 *p, struct svc_fh *fhp) | 77 | encode_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 | */ |
94 | static inline __be32 * | 90 | static __be32 * |
95 | decode_filename(__be32 *p, char **namp, int *lenp) | 91 | decode_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 | ||
110 | static inline __be32 * | 106 | static __be32 * |
111 | decode_sattr3(__be32 *p, struct iattr *iap) | 107 | decode_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 | ||
156 | static inline __be32 * | 152 | static __be32 * |
157 | encode_fattr3(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, | 153 | encode_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 | ||
189 | static inline __be32 * | 185 | static __be32 * |
190 | encode_saved_post_attr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp) | 186 | encode_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 | ||
779 | static inline __be32 * | 775 | static __be32 * |
780 | encode_entry_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name, | 776 | encode_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 | ||
793 | static inline __be32 * | 789 | static __be32 * |
794 | encode_entryplus_baggage(struct nfsd3_readdirres *cd, __be32 *p, | 790 | encode_entryplus_baggage(struct nfsd3_readdirres *cd, __be32 *p, |
795 | struct svc_fh *fhp) | 791 | struct svc_fh *fhp) |
796 | { | 792 | { |