summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2015-07-01 16:25:57 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2015-07-01 16:25:57 +0200
commitf0139aa819dfc8e80f664bd08800fc48233cb94e (patch)
tree6a2d0a951ca5f45646a9ef30875934621b0d9b04 /fs
parentde15522646b9822d82b613d84cfeb4482370db3d (diff)
downloadlinux-f0139aa819dfc8e80f664bd08800fc48233cb94e.tar.gz
linux-f0139aa819dfc8e80f664bd08800fc48233cb94e.tar.bz2
linux-f0139aa819dfc8e80f664bd08800fc48233cb94e.zip
fuse: fold fuse_request_send_nowait() into single caller
And the same with fuse_request_send_nowait_locked(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: Ashish Samant <ashish.samant@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/fuse/dev.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 155610fef4a7..de110de881f7 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -590,14 +590,20 @@ ssize_t fuse_simple_request(struct fuse_conn *fc, struct fuse_args *args)
return ret;
}
-static void fuse_request_send_nowait_locked(struct fuse_conn *fc,
- struct fuse_req *req)
+/*
+ * Called under fc->lock
+ *
+ * fc->connected must have been checked previously
+ */
+void fuse_request_send_background_locked(struct fuse_conn *fc,
+ struct fuse_req *req)
{
BUG_ON(!req->background);
if (!req->waiting) {
req->waiting = 1;
atomic_inc(&fc->num_waiting);
}
+ req->isreply = 1;
fc->num_background++;
if (fc->num_background == fc->max_background)
fc->blocked = 1;
@@ -610,12 +616,12 @@ static void fuse_request_send_nowait_locked(struct fuse_conn *fc,
flush_bg_queue(fc);
}
-static void fuse_request_send_nowait(struct fuse_conn *fc, struct fuse_req *req)
+void fuse_request_send_background(struct fuse_conn *fc, struct fuse_req *req)
{
BUG_ON(!req->end);
spin_lock(&fc->lock);
if (fc->connected) {
- fuse_request_send_nowait_locked(fc, req);
+ fuse_request_send_background_locked(fc, req);
spin_unlock(&fc->lock);
} else {
spin_unlock(&fc->lock);
@@ -624,12 +630,6 @@ static void fuse_request_send_nowait(struct fuse_conn *fc, struct fuse_req *req)
fuse_put_request(fc, req);
}
}
-
-void fuse_request_send_background(struct fuse_conn *fc, struct fuse_req *req)
-{
- req->isreply = 1;
- fuse_request_send_nowait(fc, req);
-}
EXPORT_SYMBOL_GPL(fuse_request_send_background);
static int fuse_request_send_notify_reply(struct fuse_conn *fc,
@@ -649,18 +649,6 @@ static int fuse_request_send_notify_reply(struct fuse_conn *fc,
return err;
}
-/*
- * Called under fc->lock
- *
- * fc->connected must have been checked previously
- */
-void fuse_request_send_background_locked(struct fuse_conn *fc,
- struct fuse_req *req)
-{
- req->isreply = 1;
- fuse_request_send_nowait_locked(fc, req);
-}
-
void fuse_force_forget(struct file *file, u64 nodeid)
{
struct inode *inode = file_inode(file);