diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-17 01:14:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 02:15:29 -0500 |
commit | 8bfc016d2e2fff71c6843257f0fd0b60876331ed (patch) | |
tree | c12cff675fcd734a93a274545d93ef153939ad9f /fs/fuse | |
parent | b3bebd94bbe4e59dfa23d85b0296a4ce8ebcc6c7 (diff) |
[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>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dev.c | 21 | ||||
-rw-r--r-- | fs/fuse/dir.c | 12 | ||||
-rw-r--r-- | fs/fuse/file.c | 5 |
3 files changed, 17 insertions, 21 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 8244e89a8dd6..d76432b757c9 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -21,7 +21,7 @@ MODULE_ALIAS_MISCDEV(FUSE_MINOR); | |||
21 | 21 | ||
22 | static kmem_cache_t *fuse_req_cachep; | 22 | static kmem_cache_t *fuse_req_cachep; |
23 | 23 | ||
24 | static inline struct fuse_conn *fuse_get_conn(struct file *file) | 24 | static struct fuse_conn *fuse_get_conn(struct file *file) |
25 | { | 25 | { |
26 | struct fuse_conn *fc; | 26 | struct fuse_conn *fc; |
27 | spin_lock(&fuse_lock); | 27 | spin_lock(&fuse_lock); |
@@ -32,7 +32,7 @@ static inline struct fuse_conn *fuse_get_conn(struct file *file) | |||
32 | return fc; | 32 | return fc; |
33 | } | 33 | } |
34 | 34 | ||
35 | static inline void fuse_request_init(struct fuse_req *req) | 35 | static void fuse_request_init(struct fuse_req *req) |
36 | { | 36 | { |
37 | memset(req, 0, sizeof(*req)); | 37 | memset(req, 0, sizeof(*req)); |
38 | INIT_LIST_HEAD(&req->list); | 38 | INIT_LIST_HEAD(&req->list); |
@@ -53,7 +53,7 @@ void fuse_request_free(struct fuse_req *req) | |||
53 | kmem_cache_free(fuse_req_cachep, req); | 53 | kmem_cache_free(fuse_req_cachep, req); |
54 | } | 54 | } |
55 | 55 | ||
56 | static inline void block_sigs(sigset_t *oldset) | 56 | static void block_sigs(sigset_t *oldset) |
57 | { | 57 | { |
58 | sigset_t mask; | 58 | sigset_t mask; |
59 | 59 | ||
@@ -61,7 +61,7 @@ static inline void block_sigs(sigset_t *oldset) | |||
61 | sigprocmask(SIG_BLOCK, &mask, oldset); | 61 | sigprocmask(SIG_BLOCK, &mask, oldset); |
62 | } | 62 | } |
63 | 63 | ||
64 | static inline void restore_sigs(sigset_t *oldset) | 64 | static void restore_sigs(sigset_t *oldset) |
65 | { | 65 | { |
66 | sigprocmask(SIG_SETMASK, oldset, NULL); | 66 | sigprocmask(SIG_SETMASK, oldset, NULL); |
67 | } | 67 | } |
@@ -385,7 +385,7 @@ void fuse_send_init(struct fuse_conn *fc) | |||
385 | * anything that could cause a page-fault. If the request was already | 385 | * anything that could cause a page-fault. If the request was already |
386 | * interrupted bail out. | 386 | * interrupted bail out. |
387 | */ | 387 | */ |
388 | static inline int lock_request(struct fuse_req *req) | 388 | static int lock_request(struct fuse_req *req) |
389 | { | 389 | { |
390 | int err = 0; | 390 | int err = 0; |
391 | if (req) { | 391 | if (req) { |
@@ -404,7 +404,7 @@ static inline int lock_request(struct fuse_req *req) | |||
404 | * requester thread is currently waiting for it to be unlocked, so | 404 | * requester thread is currently waiting for it to be unlocked, so |
405 | * wake it up. | 405 | * wake it up. |
406 | */ | 406 | */ |
407 | static inline void unlock_request(struct fuse_req *req) | 407 | static void unlock_request(struct fuse_req *req) |
408 | { | 408 | { |
409 | if (req) { | 409 | if (req) { |
410 | spin_lock(&fuse_lock); | 410 | spin_lock(&fuse_lock); |
@@ -440,7 +440,7 @@ static void fuse_copy_init(struct fuse_copy_state *cs, int write, | |||
440 | } | 440 | } |
441 | 441 | ||
442 | /* Unmap and put previous page of userspace buffer */ | 442 | /* Unmap and put previous page of userspace buffer */ |
443 | static inline void fuse_copy_finish(struct fuse_copy_state *cs) | 443 | static void fuse_copy_finish(struct fuse_copy_state *cs) |
444 | { | 444 | { |
445 | if (cs->mapaddr) { | 445 | if (cs->mapaddr) { |
446 | kunmap_atomic(cs->mapaddr, KM_USER0); | 446 | kunmap_atomic(cs->mapaddr, KM_USER0); |
@@ -489,8 +489,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs) | |||
489 | } | 489 | } |
490 | 490 | ||
491 | /* Do as much copy to/from userspace buffer as we can */ | 491 | /* Do as much copy to/from userspace buffer as we can */ |
492 | static inline int fuse_copy_do(struct fuse_copy_state *cs, void **val, | 492 | static int fuse_copy_do(struct fuse_copy_state *cs, void **val, unsigned *size) |
493 | unsigned *size) | ||
494 | { | 493 | { |
495 | unsigned ncpy = min(*size, cs->len); | 494 | unsigned ncpy = min(*size, cs->len); |
496 | if (val) { | 495 | if (val) { |
@@ -510,8 +509,8 @@ static inline int fuse_copy_do(struct fuse_copy_state *cs, void **val, | |||
510 | * Copy a page in the request to/from the userspace buffer. Must be | 509 | * Copy a page in the request to/from the userspace buffer. Must be |
511 | * done atomically | 510 | * done atomically |
512 | */ | 511 | */ |
513 | static inline int fuse_copy_page(struct fuse_copy_state *cs, struct page *page, | 512 | static int fuse_copy_page(struct fuse_copy_state *cs, struct page *page, |
514 | unsigned offset, unsigned count, int zeroing) | 513 | unsigned offset, unsigned count, int zeroing) |
515 | { | 514 | { |
516 | if (page && zeroing && count < PAGE_SIZE) { | 515 | if (page && zeroing && count < PAGE_SIZE) { |
517 | void *mapaddr = kmap_atomic(page, KM_USER1); | 516 | void *mapaddr = kmap_atomic(page, KM_USER1); |
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 417bcee466f6..e47fa3a2b4af 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -23,8 +23,7 @@ | |||
23 | /* | 23 | /* |
24 | * Calculate the time in jiffies until a dentry/attributes are valid | 24 | * Calculate the time in jiffies until a dentry/attributes are valid |
25 | */ | 25 | */ |
26 | static inline unsigned long time_to_jiffies(unsigned long sec, | 26 | static unsigned long time_to_jiffies(unsigned long sec, unsigned long nsec) |
27 | unsigned long nsec) | ||
28 | { | 27 | { |
29 | struct timespec ts = {sec, nsec}; | 28 | struct timespec ts = {sec, nsec}; |
30 | return jiffies + timespec_to_jiffies(&ts); | 29 | return jiffies + timespec_to_jiffies(&ts); |
@@ -157,7 +156,7 @@ static int dir_alias(struct inode *inode) | |||
157 | return 0; | 156 | return 0; |
158 | } | 157 | } |
159 | 158 | ||
160 | static inline int invalid_nodeid(u64 nodeid) | 159 | static int invalid_nodeid(u64 nodeid) |
161 | { | 160 | { |
162 | return !nodeid || nodeid == FUSE_ROOT_ID; | 161 | return !nodeid || nodeid == FUSE_ROOT_ID; |
163 | } | 162 | } |
@@ -166,7 +165,7 @@ static struct dentry_operations fuse_dentry_operations = { | |||
166 | .d_revalidate = fuse_dentry_revalidate, | 165 | .d_revalidate = fuse_dentry_revalidate, |
167 | }; | 166 | }; |
168 | 167 | ||
169 | static inline int valid_mode(int m) | 168 | static int valid_mode(int m) |
170 | { | 169 | { |
171 | return S_ISREG(m) || S_ISDIR(m) || S_ISLNK(m) || S_ISCHR(m) || | 170 | return S_ISREG(m) || S_ISDIR(m) || S_ISLNK(m) || S_ISCHR(m) || |
172 | S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m); | 171 | 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, | |||
763 | return 0; | 762 | return 0; |
764 | } | 763 | } |
765 | 764 | ||
766 | static inline size_t fuse_send_readdir(struct fuse_req *req, struct file *file, | 765 | static size_t fuse_send_readdir(struct fuse_req *req, struct file *file, |
767 | struct inode *inode, loff_t pos, | 766 | struct inode *inode, loff_t pos, size_t count) |
768 | size_t count) | ||
769 | { | 767 | { |
770 | return fuse_send_read_common(req, file, inode, pos, count, 1); | 768 | return fuse_send_read_common(req, file, inode, pos, count, 1); |
771 | } | 769 | } |
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 63d2980df5c9..52557664a89e 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -267,9 +267,8 @@ size_t fuse_send_read_common(struct fuse_req *req, struct file *file, | |||
267 | return req->out.args[0].size; | 267 | return req->out.args[0].size; |
268 | } | 268 | } |
269 | 269 | ||
270 | static inline size_t fuse_send_read(struct fuse_req *req, struct file *file, | 270 | static size_t fuse_send_read(struct fuse_req *req, struct file *file, |
271 | struct inode *inode, loff_t pos, | 271 | struct inode *inode, loff_t pos, size_t count) |
272 | size_t count) | ||
273 | { | 272 | { |
274 | return fuse_send_read_common(req, file, inode, pos, count, 0); | 273 | return fuse_send_read_common(req, file, inode, pos, count, 0); |
275 | } | 274 | } |