Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Salvatore Bonaccorso <carnil@debian.org>
To: Julien Leclerc <julien.leclerc@saatchi.fr>,
	Jeff Layton <jlayton@kernel.org>
Cc: linux-nfs@vger.kernel.org, 1153524@bugs.debian.org,
	Chuck Lever <chuck.lever@oracle.com>,
	regressions@lists.linux.dev, stable@vger.kernel.org,
	Benjamin Coddington <bcodding@redhat.com>,
	Christian Brauner <brauner@kernel.org>,
	Salvatore Bonaccorso <carnil@debian.org>
Subject: [PATCH 2/4] gfs2/ocfs2: set FOP_ASYNC_LOCK
Date: Fri,  4 Dec 2026 15:20:30 +0100	[thread overview]
Message-ID: <20261204142703.1100372-3-carnil@debian.org> (raw)
In-Reply-To: <20261204142703.1100372-1-carnil@debian.org>

From: Benjamin Coddington <bcodding@redhat.com>

commit 2253ab99f2e978d94693d6f63c83aa5b5d4c7839 upstream.

Both GFS2 and OCFS2 use DLM locking, which will allow async lock requests.
Signal this support by setting FOP_ASYNC_LOCK.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Link: https://lore.kernel.org/r/fc4163dbbf33c58e5a8b8ee8cb8c57e555f53ce5.1726083391.git.bcodding@redhat.com
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
---
 fs/gfs2/file.c  | 2 ++
 fs/ocfs2/file.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 0b5be4ad3a96..1b40ab240913 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -1597,6 +1597,7 @@ const struct file_operations gfs2_file_fops = {
 	.splice_write	= gfs2_file_splice_write,
 	.setlease	= simple_nosetlease,
 	.fallocate	= gfs2_fallocate,
+	.fop_flags	= FOP_ASYNC_LOCK,
 };
 
 const struct file_operations gfs2_dir_fops = {
@@ -1609,6 +1610,7 @@ const struct file_operations gfs2_dir_fops = {
 	.lock		= gfs2_lock,
 	.flock		= gfs2_flock,
 	.llseek		= default_llseek,
+	.fop_flags	= FOP_ASYNC_LOCK,
 };
 
 #endif /* CONFIG_GFS2_FS_LOCKING_DLM */
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 451f0c5a5352..2bebb10a0754 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2852,6 +2852,7 @@ const struct file_operations ocfs2_fops = {
 	.splice_write	= iter_file_splice_write,
 	.fallocate	= ocfs2_fallocate,
 	.remap_file_range = ocfs2_remap_file_range,
+	.fop_flags	= FOP_ASYNC_LOCK,
 };
 
 WRAP_DIR_ITER(ocfs2_readdir) // FIXME!
@@ -2868,6 +2869,7 @@ const struct file_operations ocfs2_dops = {
 #endif
 	.lock		= ocfs2_lock,
 	.flock		= ocfs2_flock,
+	.fop_flags	= FOP_ASYNC_LOCK,
 };
 
 /*
-- 
2.55.0


  parent reply	other threads:[~2026-12-04 14:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 14:20 [PATCH 6.12.y 0/4] Backport for "NLM/NFSD: Fix lock notifications for async-capable" Salvatore Bonaccorso
2026-12-04 14:20 ` [PATCH 1/4] fs: Introduce FOP_ASYNC_LOCK Salvatore Bonaccorso
2026-12-04 14:20 ` Salvatore Bonaccorso [this message]
2026-12-04 14:20 ` [PATCH 3/4] NLM/NFSD: Fix lock notifications for async-capable filesystems Salvatore Bonaccorso
2026-12-04 14:20 ` [PATCH 4/4] nfsd: fix FL_SLEEP being set unconditionally for all LOCK types Salvatore Bonaccorso
2026-12-04 14:37 ` [PATCH 6.12.y 0/4] Backport for "NLM/NFSD: Fix lock notifications for async-capable" Jeff Layton
2026-12-04 19:49 ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204142703.1100372-3-carnil@debian.org \
    --to=carnil@debian.org \
    --cc=1153524@bugs.debian.org \
    --cc=bcodding@redhat.com \
    --cc=brauner@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=julien.leclerc@saatchi.fr \
    --cc=linux-nfs@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox