diff options
author | Tejun Heo <tj@kernel.org> | 2009-04-13 21:54:53 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2009-04-28 10:56:42 -0400 |
commit | 08cbf542bf24fb0481a54526b177347ae4046f5e (patch) | |
tree | 75ac556b4fb464172f9e1f4deca7e2d3b7649802 /fs | |
parent | a325f9b92273d6c64ec56167905b951b9827ec33 (diff) |
fuse: export symbols to be used by CUSE
Export the following symbols for CUSE.
fuse_conn_put()
fuse_conn_get()
fuse_conn_kill()
fuse_send_init()
fuse_do_open()
fuse_sync_release()
fuse_direct_io()
fuse_do_ioctl()
fuse_file_poll()
fuse_request_alloc()
fuse_get_req()
fuse_put_request()
fuse_request_send()
fuse_abort_conn()
fuse_dev_release()
fuse_dev_operations
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/dev.c | 10 | ||||
-rw-r--r-- | fs/fuse/file.c | 20 | ||||
-rw-r--r-- | fs/fuse/fuse_i.h | 13 | ||||
-rw-r--r-- | fs/fuse/inode.c | 5 |
4 files changed, 39 insertions, 9 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 368189fd4056..8fed2ed12f38 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -46,6 +46,7 @@ struct fuse_req *fuse_request_alloc(void) | |||
46 | fuse_request_init(req); | 46 | fuse_request_init(req); |
47 | return req; | 47 | return req; |
48 | } | 48 | } |
49 | EXPORT_SYMBOL_GPL(fuse_request_alloc); | ||
49 | 50 | ||
50 | struct fuse_req *fuse_request_alloc_nofs(void) | 51 | struct fuse_req *fuse_request_alloc_nofs(void) |
51 | { | 52 | { |
@@ -124,6 +125,7 @@ struct fuse_req *fuse_get_req(struct fuse_conn *fc) | |||
124 | atomic_dec(&fc->num_waiting); | 125 | atomic_dec(&fc->num_waiting); |
125 | return ERR_PTR(err); | 126 | return ERR_PTR(err); |
126 | } | 127 | } |
128 | EXPORT_SYMBOL_GPL(fuse_get_req); | ||
127 | 129 | ||
128 | /* | 130 | /* |
129 | * Return request in fuse_file->reserved_req. However that may | 131 | * Return request in fuse_file->reserved_req. However that may |
@@ -208,6 +210,7 @@ void fuse_put_request(struct fuse_conn *fc, struct fuse_req *req) | |||
208 | fuse_request_free(req); | 210 | fuse_request_free(req); |
209 | } | 211 | } |
210 | } | 212 | } |
213 | EXPORT_SYMBOL_GPL(fuse_put_request); | ||
211 | 214 | ||
212 | static unsigned len_args(unsigned numargs, struct fuse_arg *args) | 215 | static unsigned len_args(unsigned numargs, struct fuse_arg *args) |
213 | { | 216 | { |
@@ -400,6 +403,7 @@ void fuse_request_send(struct fuse_conn *fc, struct fuse_req *req) | |||
400 | } | 403 | } |
401 | spin_unlock(&fc->lock); | 404 | spin_unlock(&fc->lock); |
402 | } | 405 | } |
406 | EXPORT_SYMBOL_GPL(fuse_request_send); | ||
403 | 407 | ||
404 | static void fuse_request_send_nowait_locked(struct fuse_conn *fc, | 408 | static void fuse_request_send_nowait_locked(struct fuse_conn *fc, |
405 | struct fuse_req *req) | 409 | struct fuse_req *req) |
@@ -440,6 +444,7 @@ void fuse_request_send_background(struct fuse_conn *fc, struct fuse_req *req) | |||
440 | req->isreply = 1; | 444 | req->isreply = 1; |
441 | fuse_request_send_nowait(fc, req); | 445 | fuse_request_send_nowait(fc, req); |
442 | } | 446 | } |
447 | EXPORT_SYMBOL_GPL(fuse_request_send_background); | ||
443 | 448 | ||
444 | /* | 449 | /* |
445 | * Called under fc->lock | 450 | * Called under fc->lock |
@@ -1106,8 +1111,9 @@ void fuse_abort_conn(struct fuse_conn *fc) | |||
1106 | } | 1111 | } |
1107 | spin_unlock(&fc->lock); | 1112 | spin_unlock(&fc->lock); |
1108 | } | 1113 | } |
1114 | EXPORT_SYMBOL_GPL(fuse_abort_conn); | ||
1109 | 1115 | ||
1110 | static int fuse_dev_release(struct inode *inode, struct file *file) | 1116 | int fuse_dev_release(struct inode *inode, struct file *file) |
1111 | { | 1117 | { |
1112 | struct fuse_conn *fc = fuse_get_conn(file); | 1118 | struct fuse_conn *fc = fuse_get_conn(file); |
1113 | if (fc) { | 1119 | if (fc) { |
@@ -1121,6 +1127,7 @@ static int fuse_dev_release(struct inode *inode, struct file *file) | |||
1121 | 1127 | ||
1122 | return 0; | 1128 | return 0; |
1123 | } | 1129 | } |
1130 | EXPORT_SYMBOL_GPL(fuse_dev_release); | ||
1124 | 1131 | ||
1125 | static int fuse_dev_fasync(int fd, struct file *file, int on) | 1132 | static int fuse_dev_fasync(int fd, struct file *file, int on) |
1126 | { | 1133 | { |
@@ -1143,6 +1150,7 @@ const struct file_operations fuse_dev_operations = { | |||
1143 | .release = fuse_dev_release, | 1150 | .release = fuse_dev_release, |
1144 | .fasync = fuse_dev_fasync, | 1151 | .fasync = fuse_dev_fasync, |
1145 | }; | 1152 | }; |
1153 | EXPORT_SYMBOL_GPL(fuse_dev_operations); | ||
1146 | 1154 | ||
1147 | static struct miscdevice fuse_miscdevice = { | 1155 | static struct miscdevice fuse_miscdevice = { |
1148 | .minor = FUSE_MINOR, | 1156 | .minor = FUSE_MINOR, |
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index c5de60e873cb..fce6ce694fde 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/module.h> | ||
15 | 16 | ||
16 | static const struct file_operations fuse_direct_io_file_operations; | 17 | static const struct file_operations fuse_direct_io_file_operations; |
17 | 18 | ||
@@ -100,8 +101,8 @@ static void fuse_file_put(struct fuse_file *ff) | |||
100 | } | 101 | } |
101 | } | 102 | } |
102 | 103 | ||
103 | static int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file, | 104 | int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file, |
104 | bool isdir) | 105 | bool isdir) |
105 | { | 106 | { |
106 | struct fuse_open_out outarg; | 107 | struct fuse_open_out outarg; |
107 | struct fuse_file *ff; | 108 | struct fuse_file *ff; |
@@ -128,6 +129,7 @@ static int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file, | |||
128 | 129 | ||
129 | return 0; | 130 | return 0; |
130 | } | 131 | } |
132 | EXPORT_SYMBOL_GPL(fuse_do_open); | ||
131 | 133 | ||
132 | void fuse_finish_open(struct inode *inode, struct file *file) | 134 | void fuse_finish_open(struct inode *inode, struct file *file) |
133 | { | 135 | { |
@@ -232,6 +234,7 @@ void fuse_sync_release(struct fuse_file *ff, int flags) | |||
232 | fuse_put_request(ff->fc, ff->reserved_req); | 234 | fuse_put_request(ff->fc, ff->reserved_req); |
233 | kfree(ff); | 235 | kfree(ff); |
234 | } | 236 | } |
237 | EXPORT_SYMBOL_GPL(fuse_sync_release); | ||
235 | 238 | ||
236 | /* | 239 | /* |
237 | * Scramble the ID space with XTEA, so that the value of the files_struct | 240 | * Scramble the ID space with XTEA, so that the value of the files_struct |
@@ -1009,8 +1012,8 @@ static int fuse_get_user_pages(struct fuse_req *req, const char __user *buf, | |||
1009 | return 0; | 1012 | return 0; |
1010 | } | 1013 | } |
1011 | 1014 | ||
1012 | static ssize_t fuse_direct_io(struct file *file, const char __user *buf, | 1015 | ssize_t fuse_direct_io(struct file *file, const char __user *buf, |
1013 | size_t count, loff_t *ppos, int write) | 1016 | size_t count, loff_t *ppos, int write) |
1014 | { | 1017 | { |
1015 | struct fuse_file *ff = file->private_data; | 1018 | struct fuse_file *ff = file->private_data; |
1016 | struct fuse_conn *fc = ff->fc; | 1019 | struct fuse_conn *fc = ff->fc; |
@@ -1066,6 +1069,7 @@ static ssize_t fuse_direct_io(struct file *file, const char __user *buf, | |||
1066 | 1069 | ||
1067 | return res; | 1070 | return res; |
1068 | } | 1071 | } |
1072 | EXPORT_SYMBOL_GPL(fuse_direct_io); | ||
1069 | 1073 | ||
1070 | static ssize_t fuse_direct_read(struct file *file, char __user *buf, | 1074 | static ssize_t fuse_direct_read(struct file *file, char __user *buf, |
1071 | size_t count, loff_t *ppos) | 1075 | size_t count, loff_t *ppos) |
@@ -1647,8 +1651,8 @@ static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov, | |||
1647 | * limits ioctl data transfers to well-formed ioctls and is the forced | 1651 | * limits ioctl data transfers to well-formed ioctls and is the forced |
1648 | * behavior for all FUSE servers. | 1652 | * behavior for all FUSE servers. |
1649 | */ | 1653 | */ |
1650 | static long fuse_do_ioctl(struct file *file, unsigned int cmd, | 1654 | long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg, |
1651 | unsigned long arg, unsigned int flags) | 1655 | unsigned int flags) |
1652 | { | 1656 | { |
1653 | struct fuse_file *ff = file->private_data; | 1657 | struct fuse_file *ff = file->private_data; |
1654 | struct fuse_conn *fc = ff->fc; | 1658 | struct fuse_conn *fc = ff->fc; |
@@ -1813,6 +1817,7 @@ static long fuse_do_ioctl(struct file *file, unsigned int cmd, | |||
1813 | 1817 | ||
1814 | return err ? err : outarg.result; | 1818 | return err ? err : outarg.result; |
1815 | } | 1819 | } |
1820 | EXPORT_SYMBOL_GPL(fuse_do_ioctl); | ||
1816 | 1821 | ||
1817 | static long fuse_file_ioctl_common(struct file *file, unsigned int cmd, | 1822 | static long fuse_file_ioctl_common(struct file *file, unsigned int cmd, |
1818 | unsigned long arg, unsigned int flags) | 1823 | unsigned long arg, unsigned int flags) |
@@ -1892,7 +1897,7 @@ static void fuse_register_polled_file(struct fuse_conn *fc, | |||
1892 | spin_unlock(&fc->lock); | 1897 | spin_unlock(&fc->lock); |
1893 | } | 1898 | } |
1894 | 1899 | ||
1895 | static unsigned fuse_file_poll(struct file *file, poll_table *wait) | 1900 | unsigned fuse_file_poll(struct file *file, poll_table *wait) |
1896 | { | 1901 | { |
1897 | struct fuse_file *ff = file->private_data; | 1902 | struct fuse_file *ff = file->private_data; |
1898 | struct fuse_conn *fc = ff->fc; | 1903 | struct fuse_conn *fc = ff->fc; |
@@ -1939,6 +1944,7 @@ static unsigned fuse_file_poll(struct file *file, poll_table *wait) | |||
1939 | } | 1944 | } |
1940 | return POLLERR; | 1945 | return POLLERR; |
1941 | } | 1946 | } |
1947 | EXPORT_SYMBOL_GPL(fuse_file_poll); | ||
1942 | 1948 | ||
1943 | /* | 1949 | /* |
1944 | * This is called from fuse_handle_notify() on FUSE_NOTIFY_POLL and | 1950 | * This is called from fuse_handle_notify() on FUSE_NOTIFY_POLL and |
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 2efcf12b763a..aaf2f9ff970e 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h | |||
@@ -261,6 +261,8 @@ struct fuse_req { | |||
261 | } release; | 261 | } release; |
262 | struct fuse_init_in init_in; | 262 | struct fuse_init_in init_in; |
263 | struct fuse_init_out init_out; | 263 | struct fuse_init_out init_out; |
264 | struct cuse_init_in cuse_init_in; | ||
265 | struct cuse_init_out cuse_init_out; | ||
264 | struct { | 266 | struct { |
265 | struct fuse_read_in in; | 267 | struct fuse_read_in in; |
266 | u64 attr_ver; | 268 | u64 attr_ver; |
@@ -662,6 +664,8 @@ void fuse_invalidate_entry_cache(struct dentry *entry); | |||
662 | */ | 664 | */ |
663 | struct fuse_conn *fuse_conn_get(struct fuse_conn *fc); | 665 | struct fuse_conn *fuse_conn_get(struct fuse_conn *fc); |
664 | 666 | ||
667 | void fuse_conn_kill(struct fuse_conn *fc); | ||
668 | |||
665 | /** | 669 | /** |
666 | * Initialize fuse_conn | 670 | * Initialize fuse_conn |
667 | */ | 671 | */ |
@@ -704,4 +708,13 @@ void fuse_release_nowrite(struct inode *inode); | |||
704 | 708 | ||
705 | u64 fuse_get_attr_version(struct fuse_conn *fc); | 709 | u64 fuse_get_attr_version(struct fuse_conn *fc); |
706 | 710 | ||
711 | int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file, | ||
712 | bool isdir); | ||
713 | ssize_t fuse_direct_io(struct file *file, const char __user *buf, | ||
714 | size_t count, loff_t *ppos, int write); | ||
715 | long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg, | ||
716 | unsigned int flags); | ||
717 | unsigned fuse_file_poll(struct file *file, poll_table *wait); | ||
718 | int fuse_dev_release(struct inode *inode, struct file *file); | ||
719 | |||
707 | #endif /* _FS_FUSE_I_H */ | 720 | #endif /* _FS_FUSE_I_H */ |
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index fea7c1064d30..d8673ccf90b7 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -280,7 +280,7 @@ static void fuse_bdi_destroy(struct fuse_conn *fc) | |||
280 | bdi_destroy(&fc->bdi); | 280 | bdi_destroy(&fc->bdi); |
281 | } | 281 | } |
282 | 282 | ||
283 | static void fuse_conn_kill(struct fuse_conn *fc) | 283 | void fuse_conn_kill(struct fuse_conn *fc) |
284 | { | 284 | { |
285 | spin_lock(&fc->lock); | 285 | spin_lock(&fc->lock); |
286 | fc->connected = 0; | 286 | fc->connected = 0; |
@@ -297,6 +297,7 @@ static void fuse_conn_kill(struct fuse_conn *fc) | |||
297 | mutex_unlock(&fuse_mutex); | 297 | mutex_unlock(&fuse_mutex); |
298 | fuse_bdi_destroy(fc); | 298 | fuse_bdi_destroy(fc); |
299 | } | 299 | } |
300 | EXPORT_SYMBOL_GPL(fuse_conn_kill); | ||
300 | 301 | ||
301 | static void fuse_put_super(struct super_block *sb) | 302 | static void fuse_put_super(struct super_block *sb) |
302 | { | 303 | { |
@@ -508,12 +509,14 @@ void fuse_conn_put(struct fuse_conn *fc) | |||
508 | fc->release(fc); | 509 | fc->release(fc); |
509 | } | 510 | } |
510 | } | 511 | } |
512 | EXPORT_SYMBOL_GPL(fuse_conn_put); | ||
511 | 513 | ||
512 | struct fuse_conn *fuse_conn_get(struct fuse_conn *fc) | 514 | struct fuse_conn *fuse_conn_get(struct fuse_conn *fc) |
513 | { | 515 | { |
514 | atomic_inc(&fc->count); | 516 | atomic_inc(&fc->count); |
515 | return fc; | 517 | return fc; |
516 | } | 518 | } |
519 | EXPORT_SYMBOL_GPL(fuse_conn_get); | ||
517 | 520 | ||
518 | static struct inode *fuse_get_root_inode(struct super_block *sb, unsigned mode) | 521 | static struct inode *fuse_get_root_inode(struct super_block *sb, unsigned mode) |
519 | { | 522 | { |