[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230529015656.3099390-1-lijun01@kylinos.cn>
Date: Mon, 29 May 2023 09:56:56 +0800
From: lijun <lijun01@...inos.cn>
To: miklos@...redi.hu
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
lijun01@...inos.cn
Subject: [PATCH] FUSE: dev: Change the posiion of spin_lock
just list_del need spin_lock ,so the spin_lock should be close to
"list_del(&req->list)", this may add a little benefit.
Signed-off-by: lijun <lijun01@...inos.cn>
---
fs/fuse/dev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 1a8f82f478cb..c3a0a04ea9b4 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -388,16 +388,15 @@ static void request_wait_answer(struct fuse_req *req)
if (!err)
return;
- spin_lock(&fiq->lock);
/* Request is not yet in userspace, bail out */
if (test_bit(FR_PENDING, &req->flags)) {
+ spin_lock(&fiq->lock);
list_del(&req->list);
spin_unlock(&fiq->lock);
__fuse_put_request(req);
req->out.h.error = -EINTR;
return;
}
- spin_unlock(&fiq->lock);
}
/*
--
2.34.1
Powered by blists - more mailing lists