Skip to content

Commit 92270d0

Browse files
bsberndMiklos Szeredi
authored andcommitted
fuse: rename to fuse_dev_end_requests and make non-static
This function is needed by fuse_uring.c to clean ring queues, so make it non static. Especially in non-static mode the function name 'end_requests' should be prefixed with fuse_ Signed-off-by: Bernd Schubert <bschubert@ddn.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Joanne Koong <joannelkoong@gmail.com> Reviewed-by: Luis Henriques <luis@igalia.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
1 parent ffd294d commit 92270d0

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

fs/fuse/dev.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
#include "fuse_i.h"
10+
#include "fuse_dev_i.h"
1011

1112
#include <linux/init.h>
1213
#include <linux/module.h>
@@ -34,8 +35,6 @@ MODULE_ALIAS("devname:fuse");
3435

3536
static struct kmem_cache *fuse_req_cachep;
3637

37-
static void end_requests(struct list_head *head);
38-
3938
static struct fuse_dev *fuse_get_dev(struct file *file)
4039
{
4140
/*
@@ -1885,7 +1884,7 @@ static void fuse_resend(struct fuse_conn *fc)
18851884
spin_unlock(&fiq->lock);
18861885
list_for_each_entry(req, &to_queue, list)
18871886
clear_bit(FR_PENDING, &req->flags);
1888-
end_requests(&to_queue);
1887+
fuse_dev_end_requests(&to_queue);
18891888
return;
18901889
}
18911890
/* iq and pq requests are both oldest to newest */
@@ -2204,7 +2203,7 @@ static __poll_t fuse_dev_poll(struct file *file, poll_table *wait)
22042203
}
22052204

22062205
/* Abort all requests on the given list (pending or processing) */
2207-
static void end_requests(struct list_head *head)
2206+
void fuse_dev_end_requests(struct list_head *head)
22082207
{
22092208
while (!list_empty(head)) {
22102209
struct fuse_req *req;
@@ -2307,7 +2306,7 @@ void fuse_abort_conn(struct fuse_conn *fc)
23072306
wake_up_all(&fc->blocked_waitq);
23082307
spin_unlock(&fc->lock);
23092308

2310-
end_requests(&to_end);
2309+
fuse_dev_end_requests(&to_end);
23112310
} else {
23122311
spin_unlock(&fc->lock);
23132312
}
@@ -2337,7 +2336,7 @@ int fuse_dev_release(struct inode *inode, struct file *file)
23372336
list_splice_init(&fpq->processing[i], &to_end);
23382337
spin_unlock(&fpq->lock);
23392338

2340-
end_requests(&to_end);
2339+
fuse_dev_end_requests(&to_end);
23412340

23422341
/* Are we the last open device? */
23432342
if (atomic_dec_and_test(&fc->dev_count)) {

fs/fuse/fuse_dev_i.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* SPDX-License-Identifier: GPL-2.0
2+
*
3+
* FUSE: Filesystem in Userspace
4+
* Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu>
5+
*/
6+
#ifndef _FS_FUSE_DEV_I_H
7+
#define _FS_FUSE_DEV_I_H
8+
9+
#include <linux/types.h>
10+
11+
void fuse_dev_end_requests(struct list_head *head);
12+
13+
#endif
14+

0 commit comments

Comments
 (0)