Skip to content

Commit

Permalink
fuse: export fuse_get_unique()
Browse files Browse the repository at this point in the history
virtio-fs will need unique IDs for FORGET requests from outside
fs/fuse/dev.c.  Make the symbol visible.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
Stefan Hajnoczi authored and Miklos Szeredi committed Sep 12, 2019
1 parent 95a84cd commit 79d96ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ unsigned int fuse_len_args(unsigned int numargs, struct fuse_arg *args)
}
EXPORT_SYMBOL_GPL(fuse_len_args);

static u64 fuse_get_unique(struct fuse_iqueue *fiq)
u64 fuse_get_unique(struct fuse_iqueue *fiq)
{
fiq->reqctr += FUSE_REQ_ID_STEP;
return fiq->reqctr;
}
EXPORT_SYMBOL_GPL(fuse_get_unique);

static unsigned int fuse_req_hash(u64 unique)
{
Expand Down
5 changes: 5 additions & 0 deletions fs/fuse/fuse_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -977,4 +977,9 @@ int fuse_readdir(struct file *file, struct dir_context *ctx);
*/
unsigned int fuse_len_args(unsigned int numargs, struct fuse_arg *args);

/**
* Get the next unique ID for a request
*/
u64 fuse_get_unique(struct fuse_iqueue *fiq);

#endif /* _FS_FUSE_I_H */

0 comments on commit 79d96ef

Please sign in to comment.