aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2009-04-28 10:56:41 -0400
committerMiklos Szeredi <mszeredi@suse.cz>2009-04-28 10:56:41 -0400
commit797759aaf31351a1ab1b9130c4f180ce496f46c5 (patch)
tree2bea6512575202090db75c5e8ab8d27e569df4a2 /fs/fuse
parentd36f248710c05714f37d921258b630bd1456b99f (diff)
fuse: don't use inode in fuse_file_poll
Use ff->fc and ff->nodeid instead of file->f_dentry->d_inode in the fuse_file_poll() implementation. This prepares this function for use by CUSE, where the inode is not owned by a fuse filesystem. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/file.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 9f0ade0b4ce8..c5de60e873cb 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1894,9 +1894,8 @@ static void fuse_register_polled_file(struct fuse_conn *fc,
1894 1894
1895static unsigned fuse_file_poll(struct file *file, poll_table *wait) 1895static unsigned fuse_file_poll(struct file *file, poll_table *wait)
1896{ 1896{
1897 struct inode *inode = file->f_dentry->d_inode;
1898 struct fuse_file *ff = file->private_data; 1897 struct fuse_file *ff = file->private_data;
1899 struct fuse_conn *fc = get_fuse_conn(inode); 1898 struct fuse_conn *fc = ff->fc;
1900 struct fuse_poll_in inarg = { .fh = ff->fh, .kh = ff->kh }; 1899 struct fuse_poll_in inarg = { .fh = ff->fh, .kh = ff->kh };
1901 struct fuse_poll_out outarg; 1900 struct fuse_poll_out outarg;
1902 struct fuse_req *req; 1901 struct fuse_req *req;
@@ -1921,7 +1920,7 @@ static unsigned fuse_file_poll(struct file *file, poll_table *wait)
1921 return PTR_ERR(req); 1920 return PTR_ERR(req);
1922 1921
1923 req->in.h.opcode = FUSE_POLL; 1922 req->in.h.opcode = FUSE_POLL;
1924 req->in.h.nodeid = get_node_id(inode); 1923 req->in.h.nodeid = ff->nodeid;
1925 req->in.numargs = 1; 1924 req->in.numargs = 1;
1926 req->in.args[0].size = sizeof(inarg); 1925 req->in.args[0].size = sizeof(inarg);
1927 req->in.args[0].value = &inarg; 1926 req->in.args[0].value = &inarg;