aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-04-13 21:54:53 -0400
committerMiklos Szeredi <mszeredi@suse.cz>2009-04-28 10:56:42 -0400
commit08cbf542bf24fb0481a54526b177347ae4046f5e (patch)
tree75ac556b4fb464172f9e1f4deca7e2d3b7649802 /fs/fuse
parenta325f9b92273d6c64ec56167905b951b9827ec33 (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/fuse')
-rw-r--r--fs/fuse/dev.c10
-rw-r--r--fs/fuse/file.c20
-rw-r--r--fs/fuse/fuse_i.h13
-rw-r--r--fs/fuse/inode.c5
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}
49EXPORT_SYMBOL_GPL(fuse_request_alloc);
49 50
50struct fuse_req *fuse_request_alloc_nofs(void) 51struct 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}
128EXPORT_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}
213EXPORT_SYMBOL_GPL(fuse_put_request);
211 214
212static unsigned len_args(unsigned numargs, struct fuse_arg *args) 215static 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}
406EXPORT_SYMBOL_GPL(fuse_request_send);
403 407
404static void fuse_request_send_nowait_locked(struct fuse_conn *fc, 408static 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}
447EXPORT_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}
1114EXPORT_SYMBOL_GPL(fuse_abort_conn);
1109 1115
1110static int fuse_dev_release(struct inode *inode, struct file *file) 1116int 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}
1130EXPORT_SYMBOL_GPL(fuse_dev_release);
1124 1131
1125static int fuse_dev_fasync(int fd, struct file *file, int on) 1132static 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};
1153EXPORT_SYMBOL_GPL(fuse_dev_operations);
1146 1154
1147static struct miscdevice fuse_miscdevice = { 1155static 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
16static const struct file_operations fuse_direct_io_file_operations; 17static 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
103static int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file, 104int 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}
132EXPORT_SYMBOL_GPL(fuse_do_open);
131 133
132void fuse_finish_open(struct inode *inode, struct file *file) 134void 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}
237EXPORT_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
1012static ssize_t fuse_direct_io(struct file *file, const char __user *buf, 1015ssize_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}
1072EXPORT_SYMBOL_GPL(fuse_direct_io);
1069 1073
1070static ssize_t fuse_direct_read(struct file *file, char __user *buf, 1074static 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 */
1650static long fuse_do_ioctl(struct file *file, unsigned int cmd, 1654long 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}
1820EXPORT_SYMBOL_GPL(fuse_do_ioctl);
1816 1821
1817static long fuse_file_ioctl_common(struct file *file, unsigned int cmd, 1822static 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
1895static unsigned fuse_file_poll(struct file *file, poll_table *wait) 1900unsigned 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}
1947EXPORT_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 */
663struct fuse_conn *fuse_conn_get(struct fuse_conn *fc); 665struct fuse_conn *fuse_conn_get(struct fuse_conn *fc);
664 666
667void 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
705u64 fuse_get_attr_version(struct fuse_conn *fc); 709u64 fuse_get_attr_version(struct fuse_conn *fc);
706 710
711int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file,
712 bool isdir);
713ssize_t fuse_direct_io(struct file *file, const char __user *buf,
714 size_t count, loff_t *ppos, int write);
715long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
716 unsigned int flags);
717unsigned fuse_file_poll(struct file *file, poll_table *wait);
718int 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
283static void fuse_conn_kill(struct fuse_conn *fc) 283void 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}
300EXPORT_SYMBOL_GPL(fuse_conn_kill);
300 301
301static void fuse_put_super(struct super_block *sb) 302static 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}
512EXPORT_SYMBOL_GPL(fuse_conn_put);
511 513
512struct fuse_conn *fuse_conn_get(struct fuse_conn *fc) 514struct 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}
519EXPORT_SYMBOL_GPL(fuse_conn_get);
517 520
518static struct inode *fuse_get_root_inode(struct super_block *sb, unsigned mode) 521static struct inode *fuse_get_root_inode(struct super_block *sb, unsigned mode)
519{ 522{