* [PATCH] nfsd: nfsd_file_lease_notifier_call gets a file_lease as an argument
@ 2024-07-12 11:26 Jeff Layton
2024-07-12 17:08 ` Chuck Lever
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2024-07-12 11:26 UTC (permalink / raw)
To: Chuck Lever, Neil Brown, Olga Kornievskaia, Dai Ngo, Tom Talpey
Cc: linux-nfs, linux-kernel, Jeff Layton
"data" actually refers to a file_lease and not a file_lock. Both structs
have their file_lock_core as the first field though, so this bug should
be harmless without struct randomization in play.
Fixes: 05580bbfc6bc ("nfsd: adapt to breakup of struct file_lock")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfsd/filecache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index 88dac1abdde3..ea506882fec2 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -667,7 +667,7 @@ static int
nfsd_file_lease_notifier_call(struct notifier_block *nb, unsigned long arg,
void *data)
{
- struct file_lock *fl = data;
+ struct file_lease *fl = data;
/* Only close files for F_SETLEASE leases */
if (fl->c.flc_flags & FL_LEASE)
---
base-commit: f862772862db0e2bbd711a03ac6e6cff89e306cb
change-id: 20240712-nfsd-next-ba50db14fc85
Best regards,
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] nfsd: nfsd_file_lease_notifier_call gets a file_lease as an argument
2024-07-12 11:26 [PATCH] nfsd: nfsd_file_lease_notifier_call gets a file_lease as an argument Jeff Layton
@ 2024-07-12 17:08 ` Chuck Lever
0 siblings, 0 replies; 2+ messages in thread
From: Chuck Lever @ 2024-07-12 17:08 UTC (permalink / raw)
To: Jeff Layton
Cc: Neil Brown, Olga Kornievskaia, Dai Ngo, Tom Talpey, linux-nfs,
linux-kernel
On Fri, Jul 12, 2024 at 07:26:44AM -0400, Jeff Layton wrote:
> "data" actually refers to a file_lease and not a file_lock. Both structs
> have their file_lock_core as the first field though, so this bug should
> be harmless without struct randomization in play.
>
> Fixes: 05580bbfc6bc ("nfsd: adapt to breakup of struct file_lock")
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/nfsd/filecache.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
> index 88dac1abdde3..ea506882fec2 100644
> --- a/fs/nfsd/filecache.c
> +++ b/fs/nfsd/filecache.c
> @@ -667,7 +667,7 @@ static int
> nfsd_file_lease_notifier_call(struct notifier_block *nb, unsigned long arg,
> void *data)
> {
> - struct file_lock *fl = data;
> + struct file_lease *fl = data;
>
> /* Only close files for F_SETLEASE leases */
> if (fl->c.flc_flags & FL_LEASE)
>
> ---
> base-commit: f862772862db0e2bbd711a03ac6e6cff89e306cb
> change-id: 20240712-nfsd-next-ba50db14fc85
>
> Best regards,
> --
> Jeff Layton <jlayton@kernel.org>
>
Applied to nfsd-next (for v6.11) with the addition of Reported-by:,
Closes:, and Tested-by: tags.
--
Chuck Lever
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-12 17:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-12 11:26 [PATCH] nfsd: nfsd_file_lease_notifier_call gets a file_lease as an argument Jeff Layton
2024-07-12 17:08 ` Chuck Lever
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®