Skip to content

Commit 3821336

Browse files
bsberndMiklos Szeredi
authored andcommitted
fuse: {io-uring} Make hash-list req unique finding functions non-static
fuse-over-io-uring uses existing functions to find requests based on their unique id - make these functions non-static. Signed-off-by: Bernd Schubert <[email protected]> Reviewed-by: Joanne Koong <[email protected]> Reviewed-by: Luis Henriques <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent f773a7c commit 3821336

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

fs/fuse/dev.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ u64 fuse_get_unique(struct fuse_iqueue *fiq)
220220
}
221221
EXPORT_SYMBOL_GPL(fuse_get_unique);
222222

223-
static unsigned int fuse_req_hash(u64 unique)
223+
unsigned int fuse_req_hash(u64 unique)
224224
{
225225
return hash_long(unique & ~FUSE_INT_REQ_BIT, FUSE_PQ_HASH_BITS);
226226
}
@@ -1910,7 +1910,7 @@ static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code,
19101910
}
19111911

19121912
/* Look up request on processing list by unique ID */
1913-
static struct fuse_req *request_find(struct fuse_pqueue *fpq, u64 unique)
1913+
struct fuse_req *fuse_request_find(struct fuse_pqueue *fpq, u64 unique)
19141914
{
19151915
unsigned int hash = fuse_req_hash(unique);
19161916
struct fuse_req *req;
@@ -1994,7 +1994,7 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
19941994
spin_lock(&fpq->lock);
19951995
req = NULL;
19961996
if (fpq->connected)
1997-
req = request_find(fpq, oh.unique & ~FUSE_INT_REQ_BIT);
1997+
req = fuse_request_find(fpq, oh.unique & ~FUSE_INT_REQ_BIT);
19981998

19991999
err = -ENOENT;
20002000
if (!req) {

fs/fuse/fuse_dev_i.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
struct fuse_arg;
1616
struct fuse_args;
17+
struct fuse_pqueue;
18+
struct fuse_req;
1719

1820
struct fuse_copy_state {
1921
int write;
@@ -42,6 +44,9 @@ static inline struct fuse_dev *fuse_get_dev(struct file *file)
4244
return READ_ONCE(file->private_data);
4345
}
4446

47+
unsigned int fuse_req_hash(u64 unique);
48+
struct fuse_req *fuse_request_find(struct fuse_pqueue *fpq, u64 unique);
49+
4550
void fuse_dev_end_requests(struct list_head *head);
4651

4752
void fuse_copy_init(struct fuse_copy_state *cs, int write,

fs/fuse/fuse_i.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,11 @@ void fuse_change_entry_timeout(struct dentry *entry, struct fuse_entry_out *o);
12371237
*/
12381238
struct fuse_conn *fuse_conn_get(struct fuse_conn *fc);
12391239

1240+
/**
1241+
* Initialize the fuse processing queue
1242+
*/
1243+
void fuse_pqueue_init(struct fuse_pqueue *fpq);
1244+
12401245
/**
12411246
* Initialize fuse_conn
12421247
*/

fs/fuse/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ static void fuse_iqueue_init(struct fuse_iqueue *fiq,
938938
fiq->priv = priv;
939939
}
940940

941-
static void fuse_pqueue_init(struct fuse_pqueue *fpq)
941+
void fuse_pqueue_init(struct fuse_pqueue *fpq)
942942
{
943943
unsigned int i;
944944

0 commit comments

Comments
 (0)