[PATCH] fuse: uninline some functions

Inline keyword is unnecessary in most cases.  Clean them up.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Miklos Szeredi 2006-01-16 22:14:28 -08:00 committed by Linus Torvalds
parent b3bebd94bb
commit 8bfc016d2e
3 changed files with 17 additions and 21 deletions

View file

@ -21,7 +21,7 @@ MODULE_ALIAS_MISCDEV(FUSE_MINOR);
static kmem_cache_t *fuse_req_cachep; static kmem_cache_t *fuse_req_cachep;
static inline struct fuse_conn *fuse_get_conn(struct file *file) static struct fuse_conn *fuse_get_conn(struct file *file)
{ {
struct fuse_conn *fc; struct fuse_conn *fc;
spin_lock(&fuse_lock); spin_lock(&fuse_lock);
@ -32,7 +32,7 @@ static inline struct fuse_conn *fuse_get_conn(struct file *file)
return fc; return fc;
} }
static inline void fuse_request_init(struct fuse_req *req) static void fuse_request_init(struct fuse_req *req)
{ {
memset(req, 0, sizeof(*req)); memset(req, 0, sizeof(*req));
INIT_LIST_HEAD(&req->list); INIT_LIST_HEAD(&req->list);
@ -53,7 +53,7 @@ void fuse_request_free(struct fuse_req *req)
kmem_cache_free(fuse_req_cachep, req); kmem_cache_free(fuse_req_cachep, req);
} }
static inline void block_sigs(sigset_t *oldset) static void block_sigs(sigset_t *oldset)
{ {
sigset_t mask; sigset_t mask;
@ -61,7 +61,7 @@ static inline void block_sigs(sigset_t *oldset)
sigprocmask(SIG_BLOCK, &mask, oldset); sigprocmask(SIG_BLOCK, &mask, oldset);
} }
static inline void restore_sigs(sigset_t *oldset) static void restore_sigs(sigset_t *oldset)
{ {
sigprocmask(SIG_SETMASK, oldset, NULL); sigprocmask(SIG_SETMASK, oldset, NULL);
} }
@ -385,7 +385,7 @@ void fuse_send_init(struct fuse_conn *fc)
* anything that could cause a page-fault. If the request was already * anything that could cause a page-fault. If the request was already
* interrupted bail out. * interrupted bail out.
*/ */
static inline int lock_request(struct fuse_req *req) static int lock_request(struct fuse_req *req)
{ {
int err = 0; int err = 0;
if (req) { if (req) {
@ -404,7 +404,7 @@ static inline int lock_request(struct fuse_req *req)
* requester thread is currently waiting for it to be unlocked, so * requester thread is currently waiting for it to be unlocked, so
* wake it up. * wake it up.
*/ */
static inline void unlock_request(struct fuse_req *req) static void unlock_request(struct fuse_req *req)
{ {
if (req) { if (req) {
spin_lock(&fuse_lock); spin_lock(&fuse_lock);
@ -440,7 +440,7 @@ static void fuse_copy_init(struct fuse_copy_state *cs, int write,
} }
/* Unmap and put previous page of userspace buffer */ /* Unmap and put previous page of userspace buffer */
static inline void fuse_copy_finish(struct fuse_copy_state *cs) static void fuse_copy_finish(struct fuse_copy_state *cs)
{ {
if (cs->mapaddr) { if (cs->mapaddr) {
kunmap_atomic(cs->mapaddr, KM_USER0); kunmap_atomic(cs->mapaddr, KM_USER0);
@ -489,8 +489,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
} }
/* Do as much copy to/from userspace buffer as we can */ /* Do as much copy to/from userspace buffer as we can */
static inline int fuse_copy_do(struct fuse_copy_state *cs, void **val, static int fuse_copy_do(struct fuse_copy_state *cs, void **val, unsigned *size)
unsigned *size)
{ {
unsigned ncpy = min(*size, cs->len); unsigned ncpy = min(*size, cs->len);
if (val) { if (val) {
@ -510,8 +509,8 @@ static inline int fuse_copy_do(struct fuse_copy_state *cs, void **val,
* Copy a page in the request to/from the userspace buffer. Must be * Copy a page in the request to/from the userspace buffer. Must be
* done atomically * done atomically
*/ */
static inline int fuse_copy_page(struct fuse_copy_state *cs, struct page *page, static int fuse_copy_page(struct fuse_copy_state *cs, struct page *page,
unsigned offset, unsigned count, int zeroing) unsigned offset, unsigned count, int zeroing)
{ {
if (page && zeroing && count < PAGE_SIZE) { if (page && zeroing && count < PAGE_SIZE) {
void *mapaddr = kmap_atomic(page, KM_USER1); void *mapaddr = kmap_atomic(page, KM_USER1);

View file

@ -23,8 +23,7 @@
/* /*
* Calculate the time in jiffies until a dentry/attributes are valid * Calculate the time in jiffies until a dentry/attributes are valid
*/ */
static inline unsigned long time_to_jiffies(unsigned long sec, static unsigned long time_to_jiffies(unsigned long sec, unsigned long nsec)
unsigned long nsec)
{ {
struct timespec ts = {sec, nsec}; struct timespec ts = {sec, nsec};
return jiffies + timespec_to_jiffies(&ts); return jiffies + timespec_to_jiffies(&ts);
@ -157,7 +156,7 @@ static int dir_alias(struct inode *inode)
return 0; return 0;
} }
static inline int invalid_nodeid(u64 nodeid) static int invalid_nodeid(u64 nodeid)
{ {
return !nodeid || nodeid == FUSE_ROOT_ID; return !nodeid || nodeid == FUSE_ROOT_ID;
} }
@ -166,7 +165,7 @@ static struct dentry_operations fuse_dentry_operations = {
.d_revalidate = fuse_dentry_revalidate, .d_revalidate = fuse_dentry_revalidate,
}; };
static inline int valid_mode(int m) static int valid_mode(int m)
{ {
return S_ISREG(m) || S_ISDIR(m) || S_ISLNK(m) || S_ISCHR(m) || return S_ISREG(m) || S_ISDIR(m) || S_ISLNK(m) || S_ISCHR(m) ||
S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m); S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m);
@ -763,9 +762,8 @@ static int parse_dirfile(char *buf, size_t nbytes, struct file *file,
return 0; return 0;
} }
static inline size_t fuse_send_readdir(struct fuse_req *req, struct file *file, static size_t fuse_send_readdir(struct fuse_req *req, struct file *file,
struct inode *inode, loff_t pos, struct inode *inode, loff_t pos, size_t count)
size_t count)
{ {
return fuse_send_read_common(req, file, inode, pos, count, 1); return fuse_send_read_common(req, file, inode, pos, count, 1);
} }

View file

@ -267,9 +267,8 @@ size_t fuse_send_read_common(struct fuse_req *req, struct file *file,
return req->out.args[0].size; return req->out.args[0].size;
} }
static inline size_t fuse_send_read(struct fuse_req *req, struct file *file, static size_t fuse_send_read(struct fuse_req *req, struct file *file,
struct inode *inode, loff_t pos, struct inode *inode, loff_t pos, size_t count)
size_t count)
{ {
return fuse_send_read_common(req, file, inode, pos, count, 0); return fuse_send_read_common(req, file, inode, pos, count, 0);
} }