Skip to content

Commit

Permalink
cuse: fix broken release
Browse files Browse the repository at this point in the history
The inode parameter in cuse_release() is likely *not* a fuse inode.  It's a
small wonder it didn't blow up until now.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
Miklos Szeredi committed Sep 2, 2019
1 parent 17b2cbe commit 56d250e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/fuse/cuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,10 @@ static int cuse_open(struct inode *inode, struct file *file)

static int cuse_release(struct inode *inode, struct file *file)
{
struct fuse_inode *fi = get_fuse_inode(inode);
struct fuse_file *ff = file->private_data;
struct fuse_conn *fc = ff->fc;

fuse_sync_release(fi, ff, file->f_flags);
fuse_sync_release(NULL, ff, file->f_flags);
fuse_conn_put(fc);

return 0;
Expand Down

0 comments on commit 56d250e

Please sign in to comment.