Skip to content

Commit

Permalink
[PATCH] fuse: uninline some functions
Browse files Browse the repository at this point in the history
Inline keyword is unnecessary in most cases.  Clean them up.

Signed-off-by: Miklos Szeredi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
szmi authored and Linus Torvalds committed Jan 17, 2006
1 parent b3bebd9 commit 8bfc016
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
21 changes: 10 additions & 11 deletions fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ MODULE_ALIAS_MISCDEV(FUSE_MINOR);

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;
spin_lock(&fuse_lock);
Expand All @@ -32,7 +32,7 @@ static inline struct fuse_conn *fuse_get_conn(struct file *file)
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));
INIT_LIST_HEAD(&req->list);
Expand All @@ -53,15 +53,15 @@ void fuse_request_free(struct fuse_req *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;

siginitsetinv(&mask, sigmask(SIGKILL));
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);
}
Expand Down Expand Up @@ -385,7 +385,7 @@ void fuse_send_init(struct fuse_conn *fc)
* anything that could cause a page-fault. If the request was already
* interrupted bail out.
*/
static inline int lock_request(struct fuse_req *req)
static int lock_request(struct fuse_req *req)
{
int err = 0;
if (req) {
Expand All @@ -404,7 +404,7 @@ static inline int lock_request(struct fuse_req *req)
* requester thread is currently waiting for it to be unlocked, so
* wake it up.
*/
static inline void unlock_request(struct fuse_req *req)
static void unlock_request(struct fuse_req *req)
{
if (req) {
spin_lock(&fuse_lock);
Expand Down Expand Up @@ -440,7 +440,7 @@ static void fuse_copy_init(struct fuse_copy_state *cs, int write,
}

/* 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) {
kunmap_atomic(cs->mapaddr, KM_USER0);
Expand Down Expand Up @@ -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 */
static inline int fuse_copy_do(struct fuse_copy_state *cs, void **val,
unsigned *size)
static int fuse_copy_do(struct fuse_copy_state *cs, void **val, unsigned *size)
{
unsigned ncpy = min(*size, cs->len);
if (val) {
Expand All @@ -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
* done atomically
*/
static inline int fuse_copy_page(struct fuse_copy_state *cs, struct page *page,
unsigned offset, unsigned count, int zeroing)
static int fuse_copy_page(struct fuse_copy_state *cs, struct page *page,
unsigned offset, unsigned count, int zeroing)
{
if (page && zeroing && count < PAGE_SIZE) {
void *mapaddr = kmap_atomic(page, KM_USER1);
Expand Down
12 changes: 5 additions & 7 deletions fs/fuse/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
/*
* Calculate the time in jiffies until a dentry/attributes are valid
*/
static inline unsigned long time_to_jiffies(unsigned long sec,
unsigned long nsec)
static unsigned long time_to_jiffies(unsigned long sec, unsigned long nsec)
{
struct timespec ts = {sec, nsec};
return jiffies + timespec_to_jiffies(&ts);
Expand Down Expand Up @@ -157,7 +156,7 @@ static int dir_alias(struct inode *inode)
return 0;
}

static inline int invalid_nodeid(u64 nodeid)
static int invalid_nodeid(u64 nodeid)
{
return !nodeid || nodeid == FUSE_ROOT_ID;
}
Expand All @@ -166,7 +165,7 @@ static struct dentry_operations fuse_dentry_operations = {
.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) ||
S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m);
Expand Down Expand Up @@ -763,9 +762,8 @@ static int parse_dirfile(char *buf, size_t nbytes, struct file *file,
return 0;
}

static inline size_t fuse_send_readdir(struct fuse_req *req, struct file *file,
struct inode *inode, loff_t pos,
size_t count)
static size_t fuse_send_readdir(struct fuse_req *req, struct file *file,
struct inode *inode, loff_t pos, size_t count)
{
return fuse_send_read_common(req, file, inode, pos, count, 1);
}
Expand Down
5 changes: 2 additions & 3 deletions fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,8 @@ size_t fuse_send_read_common(struct fuse_req *req, struct file *file,
return req->out.args[0].size;
}

static inline size_t fuse_send_read(struct fuse_req *req, struct file *file,
struct inode *inode, loff_t pos,
size_t count)
static size_t fuse_send_read(struct fuse_req *req, struct file *file,
struct inode *inode, loff_t pos, size_t count)
{
return fuse_send_read_common(req, file, inode, pos, count, 0);
}
Expand Down

0 comments on commit 8bfc016

Please sign in to comment.