Commit 797759aa authored by Miklos Szeredi's avatar Miklos Szeredi

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: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent d36f2487
...@@ -1894,9 +1894,8 @@ static void fuse_register_polled_file(struct fuse_conn *fc, ...@@ -1894,9 +1894,8 @@ static void fuse_register_polled_file(struct fuse_conn *fc,
static unsigned fuse_file_poll(struct file *file, poll_table *wait) static unsigned fuse_file_poll(struct file *file, poll_table *wait)
{ {
struct inode *inode = file->f_dentry->d_inode;
struct fuse_file *ff = file->private_data; struct fuse_file *ff = file->private_data;
struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_conn *fc = ff->fc;
struct fuse_poll_in inarg = { .fh = ff->fh, .kh = ff->kh }; struct fuse_poll_in inarg = { .fh = ff->fh, .kh = ff->kh };
struct fuse_poll_out outarg; struct fuse_poll_out outarg;
struct fuse_req *req; struct fuse_req *req;
...@@ -1921,7 +1920,7 @@ static unsigned fuse_file_poll(struct file *file, poll_table *wait) ...@@ -1921,7 +1920,7 @@ static unsigned fuse_file_poll(struct file *file, poll_table *wait)
return PTR_ERR(req); return PTR_ERR(req);
req->in.h.opcode = FUSE_POLL; req->in.h.opcode = FUSE_POLL;
req->in.h.nodeid = get_node_id(inode); req->in.h.nodeid = ff->nodeid;
req->in.numargs = 1; req->in.numargs = 1;
req->in.args[0].size = sizeof(inarg); req->in.args[0].size = sizeof(inarg);
req->in.args[0].value = &inarg; req->in.args[0].value = &inarg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment