mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
[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>
This commit is contained in:
parent
219576e127
commit
3ee6f61ca0
2 changed files with 14 additions and 23 deletions
|
@ -24,10 +24,6 @@
|
||||||
|
|
||||||
#define NFSDDBG_FACILITY NFSDDBG_XDR
|
#define NFSDDBG_FACILITY NFSDDBG_XDR
|
||||||
|
|
||||||
#ifdef NFSD_OPTIMIZE_SPACE
|
|
||||||
# define inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mapping of S_IF* types to NFS file types
|
* Mapping of S_IF* types to NFS file types
|
||||||
|
@ -42,14 +38,14 @@ static u32 nfs3_ftypes[] = {
|
||||||
/*
|
/*
|
||||||
* XDR functions for basic NFS types
|
* XDR functions for basic NFS types
|
||||||
*/
|
*/
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
encode_time3(__be32 *p, struct timespec *time)
|
encode_time3(__be32 *p, struct timespec *time)
|
||||||
{
|
{
|
||||||
*p++ = htonl((u32) time->tv_sec); *p++ = htonl(time->tv_nsec);
|
*p++ = htonl((u32) time->tv_sec); *p++ = htonl(time->tv_nsec);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
decode_time3(__be32 *p, struct timespec *time)
|
decode_time3(__be32 *p, struct timespec *time)
|
||||||
{
|
{
|
||||||
time->tv_sec = ntohl(*p++);
|
time->tv_sec = ntohl(*p++);
|
||||||
|
@ -57,7 +53,7 @@ decode_time3(__be32 *p, struct timespec *time)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
decode_fh(__be32 *p, struct svc_fh *fhp)
|
decode_fh(__be32 *p, struct svc_fh *fhp)
|
||||||
{
|
{
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
|
@ -77,7 +73,7 @@ __be32 *nfs3svc_decode_fh(__be32 *p, struct svc_fh *fhp)
|
||||||
return decode_fh(p, fhp);
|
return decode_fh(p, fhp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
encode_fh(__be32 *p, struct svc_fh *fhp)
|
encode_fh(__be32 *p, struct svc_fh *fhp)
|
||||||
{
|
{
|
||||||
unsigned int size = fhp->fh_handle.fh_size;
|
unsigned int size = fhp->fh_handle.fh_size;
|
||||||
|
@ -91,7 +87,7 @@ encode_fh(__be32 *p, struct svc_fh *fhp)
|
||||||
* Decode a file name and make sure that the path contains
|
* Decode a file name and make sure that the path contains
|
||||||
* no slashes or null bytes.
|
* no slashes or null bytes.
|
||||||
*/
|
*/
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
decode_filename(__be32 *p, char **namp, int *lenp)
|
decode_filename(__be32 *p, char **namp, int *lenp)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -107,7 +103,7 @@ decode_filename(__be32 *p, char **namp, int *lenp)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
decode_sattr3(__be32 *p, struct iattr *iap)
|
decode_sattr3(__be32 *p, struct iattr *iap)
|
||||||
{
|
{
|
||||||
u32 tmp;
|
u32 tmp;
|
||||||
|
@ -153,7 +149,7 @@ decode_sattr3(__be32 *p, struct iattr *iap)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
encode_fattr3(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp,
|
encode_fattr3(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp,
|
||||||
struct kstat *stat)
|
struct kstat *stat)
|
||||||
{
|
{
|
||||||
|
@ -186,7 +182,7 @@ encode_fattr3(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp,
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
encode_saved_post_attr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp)
|
encode_saved_post_attr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp)
|
||||||
{
|
{
|
||||||
struct inode *inode = fhp->fh_dentry->d_inode;
|
struct inode *inode = fhp->fh_dentry->d_inode;
|
||||||
|
@ -776,7 +772,7 @@ nfs3svc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p,
|
||||||
return xdr_ressize_check(rqstp, p);
|
return xdr_ressize_check(rqstp, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
encode_entry_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name,
|
encode_entry_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name,
|
||||||
int namlen, ino_t ino)
|
int namlen, ino_t ino)
|
||||||
{
|
{
|
||||||
|
@ -790,7 +786,7 @@ encode_entry_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name,
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
encode_entryplus_baggage(struct nfsd3_readdirres *cd, __be32 *p,
|
encode_entryplus_baggage(struct nfsd3_readdirres *cd, __be32 *p,
|
||||||
struct svc_fh *fhp)
|
struct svc_fh *fhp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,11 +18,6 @@
|
||||||
|
|
||||||
#define NFSDDBG_FACILITY NFSDDBG_XDR
|
#define NFSDDBG_FACILITY NFSDDBG_XDR
|
||||||
|
|
||||||
|
|
||||||
#ifdef NFSD_OPTIMIZE_SPACE
|
|
||||||
# define inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mapping of S_IF* types to NFS file types
|
* Mapping of S_IF* types to NFS file types
|
||||||
*/
|
*/
|
||||||
|
@ -55,7 +50,7 @@ __be32 *nfs2svc_decode_fh(__be32 *p, struct svc_fh *fhp)
|
||||||
return decode_fh(p, fhp);
|
return decode_fh(p, fhp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
encode_fh(__be32 *p, struct svc_fh *fhp)
|
encode_fh(__be32 *p, struct svc_fh *fhp)
|
||||||
{
|
{
|
||||||
memcpy(p, &fhp->fh_handle.fh_base, NFS_FHSIZE);
|
memcpy(p, &fhp->fh_handle.fh_base, NFS_FHSIZE);
|
||||||
|
@ -66,7 +61,7 @@ encode_fh(__be32 *p, struct svc_fh *fhp)
|
||||||
* Decode a file name and make sure that the path contains
|
* Decode a file name and make sure that the path contains
|
||||||
* no slashes or null bytes.
|
* no slashes or null bytes.
|
||||||
*/
|
*/
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
decode_filename(__be32 *p, char **namp, int *lenp)
|
decode_filename(__be32 *p, char **namp, int *lenp)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -82,7 +77,7 @@ decode_filename(__be32 *p, char **namp, int *lenp)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
decode_pathname(__be32 *p, char **namp, int *lenp)
|
decode_pathname(__be32 *p, char **namp, int *lenp)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -98,7 +93,7 @@ decode_pathname(__be32 *p, char **namp, int *lenp)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline __be32 *
|
static __be32 *
|
||||||
decode_sattr(__be32 *p, struct iattr *iap)
|
decode_sattr(__be32 *p, struct iattr *iap)
|
||||||
{
|
{
|
||||||
u32 tmp, tmp1;
|
u32 tmp, tmp1;
|
||||||
|
|
Loading…
Reference in a new issue