fuse: add file kernel handle
The file handle, fuse_file->fh, is opaque value supplied by userland FUSE server and uniqueness is not guaranteed. Add file kernel handle, fuse_file->kh, which is allocated by the kernel on file allocation and guaranteed to be unique. This will be used by poll to match notification to the respective file but can be used for other purposes where unique file handle is necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
This commit is contained in:
parent
59efec7b90
commit
acf99433d9
4 changed files with 15 additions and 4 deletions
|
@ -408,7 +408,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode,
|
|||
goto out_put_forget_req;
|
||||
|
||||
err = -ENOMEM;
|
||||
ff = fuse_file_alloc();
|
||||
ff = fuse_file_alloc(fc);
|
||||
if (!ff)
|
||||
goto out_put_request;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue