diff options
author | 2024-07-12 11:54:11 +0100 | |
---|---|---|
committer | 2024-09-05 11:00:42 +0200 | |
commit | 22de489d1e9d6c30bf9554a9c58bf1dc8d951f7d (patch) | |
tree | d4b621ff448868d532a3dae39c4ee7c403a3c83c /fs/netfs/write_issue.c | |
parent | netfs: Set the request work function upon allocation (diff) | |
download | wireguard-linux-22de489d1e9d6c30bf9554a9c58bf1dc8d951f7d.tar.xz wireguard-linux-22de489d1e9d6c30bf9554a9c58bf1dc8d951f7d.zip |
netfs: Use bh-disabling spinlocks for rreq->lock
Use bh-disabling spinlocks when accessing rreq->lock because, in the
future, it may be twiddled from softirq context when cleanup is driven from
cache backend DIO completion.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20240814203850.2240469-12-dhowells@redhat.com/ # v2
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/netfs/write_issue.c')
-rw-r--r-- | fs/netfs/write_issue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/netfs/write_issue.c b/fs/netfs/write_issue.c index 41db709ca1d3..7880a586343f 100644 --- a/fs/netfs/write_issue.c +++ b/fs/netfs/write_issue.c @@ -191,7 +191,7 @@ static void netfs_prepare_write(struct netfs_io_request *wreq, * the list. The collector only goes nextwards and uses the lock to * remove entries off of the front. */ - spin_lock(&wreq->lock); + spin_lock_bh(&wreq->lock); list_add_tail(&subreq->rreq_link, &stream->subrequests); if (list_is_first(&subreq->rreq_link, &stream->subrequests)) { stream->front = subreq; @@ -202,7 +202,7 @@ static void netfs_prepare_write(struct netfs_io_request *wreq, } } - spin_unlock(&wreq->lock); + spin_unlock_bh(&wreq->lock); stream->construct = subreq; } |