Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147957
b: refs/heads/master
c: 08cbf54
h: refs/heads/master
i:
  147955: 3506d96
v: v3
  • Loading branch information
Tejun Heo authored and Miklos Szeredi committed Apr 28, 2009
1 parent fb9937b commit 78d3e82
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a325f9b92273d6c64ec56167905b951b9827ec33
refs/heads/master: 08cbf542bf24fb0481a54526b177347ae4046f5e
10 changes: 9 additions & 1 deletion trunk/fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ struct fuse_req *fuse_request_alloc(void)
fuse_request_init(req);
return req;
}
EXPORT_SYMBOL_GPL(fuse_request_alloc);

struct fuse_req *fuse_request_alloc_nofs(void)
{
Expand Down Expand Up @@ -124,6 +125,7 @@ struct fuse_req *fuse_get_req(struct fuse_conn *fc)
atomic_dec(&fc->num_waiting);
return ERR_PTR(err);
}
EXPORT_SYMBOL_GPL(fuse_get_req);

/*
* Return request in fuse_file->reserved_req. However that may
Expand Down Expand Up @@ -208,6 +210,7 @@ void fuse_put_request(struct fuse_conn *fc, struct fuse_req *req)
fuse_request_free(req);
}
}
EXPORT_SYMBOL_GPL(fuse_put_request);

static unsigned len_args(unsigned numargs, struct fuse_arg *args)
{
Expand Down Expand Up @@ -400,6 +403,7 @@ void fuse_request_send(struct fuse_conn *fc, struct fuse_req *req)
}
spin_unlock(&fc->lock);
}
EXPORT_SYMBOL_GPL(fuse_request_send);

static void fuse_request_send_nowait_locked(struct fuse_conn *fc,
struct fuse_req *req)
Expand Down Expand Up @@ -440,6 +444,7 @@ void fuse_request_send_background(struct fuse_conn *fc, struct fuse_req *req)
req->isreply = 1;
fuse_request_send_nowait(fc, req);
}
EXPORT_SYMBOL_GPL(fuse_request_send_background);

/*
* Called under fc->lock
Expand Down Expand Up @@ -1106,8 +1111,9 @@ void fuse_abort_conn(struct fuse_conn *fc)
}
spin_unlock(&fc->lock);
}
EXPORT_SYMBOL_GPL(fuse_abort_conn);

static int fuse_dev_release(struct inode *inode, struct file *file)
int fuse_dev_release(struct inode *inode, struct file *file)
{
struct fuse_conn *fc = fuse_get_conn(file);
if (fc) {
Expand All @@ -1121,6 +1127,7 @@ static int fuse_dev_release(struct inode *inode, struct file *file)

return 0;
}
EXPORT_SYMBOL_GPL(fuse_dev_release);

static int fuse_dev_fasync(int fd, struct file *file, int on)
{
Expand All @@ -1143,6 +1150,7 @@ const struct file_operations fuse_dev_operations = {
.release = fuse_dev_release,
.fasync = fuse_dev_fasync,
};
EXPORT_SYMBOL_GPL(fuse_dev_operations);

static struct miscdevice fuse_miscdevice = {
.minor = FUSE_MINOR,
Expand Down
20 changes: 13 additions & 7 deletions trunk/fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/module.h>

static const struct file_operations fuse_direct_io_file_operations;

Expand Down Expand Up @@ -100,8 +101,8 @@ static void fuse_file_put(struct fuse_file *ff)
}
}

static int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file,
bool isdir)
int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file,
bool isdir)
{
struct fuse_open_out outarg;
struct fuse_file *ff;
Expand All @@ -128,6 +129,7 @@ static int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file,

return 0;
}
EXPORT_SYMBOL_GPL(fuse_do_open);

void fuse_finish_open(struct inode *inode, struct file *file)
{
Expand Down Expand Up @@ -232,6 +234,7 @@ void fuse_sync_release(struct fuse_file *ff, int flags)
fuse_put_request(ff->fc, ff->reserved_req);
kfree(ff);
}
EXPORT_SYMBOL_GPL(fuse_sync_release);

/*
* Scramble the ID space with XTEA, so that the value of the files_struct
Expand Down Expand Up @@ -1009,8 +1012,8 @@ static int fuse_get_user_pages(struct fuse_req *req, const char __user *buf,
return 0;
}

static ssize_t fuse_direct_io(struct file *file, const char __user *buf,
size_t count, loff_t *ppos, int write)
ssize_t fuse_direct_io(struct file *file, const char __user *buf,
size_t count, loff_t *ppos, int write)
{
struct fuse_file *ff = file->private_data;
struct fuse_conn *fc = ff->fc;
Expand Down Expand Up @@ -1066,6 +1069,7 @@ static ssize_t fuse_direct_io(struct file *file, const char __user *buf,

return res;
}
EXPORT_SYMBOL_GPL(fuse_direct_io);

static ssize_t fuse_direct_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
Expand Down Expand Up @@ -1647,8 +1651,8 @@ static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov,
* limits ioctl data transfers to well-formed ioctls and is the forced
* behavior for all FUSE servers.
*/
static long fuse_do_ioctl(struct file *file, unsigned int cmd,
unsigned long arg, unsigned int flags)
long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
unsigned int flags)
{
struct fuse_file *ff = file->private_data;
struct fuse_conn *fc = ff->fc;
Expand Down Expand Up @@ -1813,6 +1817,7 @@ static long fuse_do_ioctl(struct file *file, unsigned int cmd,

return err ? err : outarg.result;
}
EXPORT_SYMBOL_GPL(fuse_do_ioctl);

static long fuse_file_ioctl_common(struct file *file, unsigned int cmd,
unsigned long arg, unsigned int flags)
Expand Down Expand Up @@ -1892,7 +1897,7 @@ static void fuse_register_polled_file(struct fuse_conn *fc,
spin_unlock(&fc->lock);
}

static unsigned fuse_file_poll(struct file *file, poll_table *wait)
unsigned fuse_file_poll(struct file *file, poll_table *wait)
{
struct fuse_file *ff = file->private_data;
struct fuse_conn *fc = ff->fc;
Expand Down Expand Up @@ -1939,6 +1944,7 @@ static unsigned fuse_file_poll(struct file *file, poll_table *wait)
}
return POLLERR;
}
EXPORT_SYMBOL_GPL(fuse_file_poll);

/*
* This is called from fuse_handle_notify() on FUSE_NOTIFY_POLL and
Expand Down
13 changes: 13 additions & 0 deletions trunk/fs/fuse/fuse_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ struct fuse_req {
} release;
struct fuse_init_in init_in;
struct fuse_init_out init_out;
struct cuse_init_in cuse_init_in;
struct cuse_init_out cuse_init_out;
struct {
struct fuse_read_in in;
u64 attr_ver;
Expand Down Expand Up @@ -662,6 +664,8 @@ void fuse_invalidate_entry_cache(struct dentry *entry);
*/
struct fuse_conn *fuse_conn_get(struct fuse_conn *fc);

void fuse_conn_kill(struct fuse_conn *fc);

/**
* Initialize fuse_conn
*/
Expand Down Expand Up @@ -704,4 +708,13 @@ void fuse_release_nowrite(struct inode *inode);

u64 fuse_get_attr_version(struct fuse_conn *fc);

int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file,
bool isdir);
ssize_t fuse_direct_io(struct file *file, const char __user *buf,
size_t count, loff_t *ppos, int write);
long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
unsigned int flags);
unsigned fuse_file_poll(struct file *file, poll_table *wait);
int fuse_dev_release(struct inode *inode, struct file *file);

#endif /* _FS_FUSE_I_H */
5 changes: 4 additions & 1 deletion trunk/fs/fuse/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ static void fuse_bdi_destroy(struct fuse_conn *fc)
bdi_destroy(&fc->bdi);
}

static void fuse_conn_kill(struct fuse_conn *fc)
void fuse_conn_kill(struct fuse_conn *fc)
{
spin_lock(&fc->lock);
fc->connected = 0;
Expand All @@ -297,6 +297,7 @@ static void fuse_conn_kill(struct fuse_conn *fc)
mutex_unlock(&fuse_mutex);
fuse_bdi_destroy(fc);
}
EXPORT_SYMBOL_GPL(fuse_conn_kill);

static void fuse_put_super(struct super_block *sb)
{
Expand Down Expand Up @@ -508,12 +509,14 @@ void fuse_conn_put(struct fuse_conn *fc)
fc->release(fc);
}
}
EXPORT_SYMBOL_GPL(fuse_conn_put);

struct fuse_conn *fuse_conn_get(struct fuse_conn *fc)
{
atomic_inc(&fc->count);
return fc;
}
EXPORT_SYMBOL_GPL(fuse_conn_get);

static struct inode *fuse_get_root_inode(struct super_block *sb, unsigned mode)
{
Expand Down

0 comments on commit 78d3e82

Please sign in to comment.