Skip to content

Commit

Permalink
fuse: unsigned open flags
Browse files Browse the repository at this point in the history
Release helpers used signed int.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
Miklos Szeredi committed Apr 12, 2021
1 parent 9ac29fd commit 54d601c
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fs/fuse/dir.c
Original file line number Diff line number Diff line change
@@ -508,7 +508,7 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry,
* 'mknod' + 'open' requests.
*/
static int fuse_create_open(struct inode *dir, struct dentry *entry,
struct file *file, unsigned flags,
struct file *file, unsigned int flags,
umode_t mode)
{
int err;
5 changes: 3 additions & 2 deletions fs/fuse/file.c
Original file line number Diff line number Diff line change
@@ -255,7 +255,7 @@ int fuse_open_common(struct inode *inode, struct file *file, bool isdir)
}

static void fuse_prepare_release(struct fuse_inode *fi, struct fuse_file *ff,
int flags, int opcode)
unsigned int flags, int opcode)
{
struct fuse_conn *fc = ff->fm->fc;
struct fuse_release_args *ra = ff->release_args;
@@ -332,7 +332,8 @@ static int fuse_release(struct inode *inode, struct file *file)
return 0;
}

void fuse_sync_release(struct fuse_inode *fi, struct fuse_file *ff, int flags)
void fuse_sync_release(struct fuse_inode *fi, struct fuse_file *ff,
unsigned int flags)
{
WARN_ON(refcount_read(&ff->count) > 1);
fuse_prepare_release(fi, ff, flags, FUSE_RELEASE);
3 changes: 2 additions & 1 deletion fs/fuse/fuse_i.h
Original file line number Diff line number Diff line change
@@ -954,7 +954,8 @@ struct fuse_file *fuse_file_alloc(struct fuse_mount *fm);
void fuse_file_free(struct fuse_file *ff);
void fuse_finish_open(struct inode *inode, struct file *file);

void fuse_sync_release(struct fuse_inode *fi, struct fuse_file *ff, int flags);
void fuse_sync_release(struct fuse_inode *fi, struct fuse_file *ff,
unsigned int flags);

/**
* Send RELEASE or RELEASEDIR request

0 comments on commit 54d601c

Please sign in to comment.