* [PATCH] filelock: fix name of file_lease slab cache
@ 2024-07-29 22:48 Omar Sandoval
2024-07-30 9:00 ` Christian Brauner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Omar Sandoval @ 2024-07-29 22:48 UTC (permalink / raw)
To: Jeff Layton, Chuck Lever; +Cc: Alexander Aring, linux-fsdevel, kernel-team
From: Omar Sandoval <osandov@fb.com>
When struct file_lease was split out from struct file_lock, the name of
the file_lock slab cache was copied to the new slab cache for
file_lease. This name conflict causes confusion in /proc/slabinfo and
/sys/kernel/slab. In particular, it caused failures in drgn's test case
for slab cache merging.
Link: https://github.com/osandov/drgn/blob/9ad29fd86499eb32847473e928b6540872d3d59a/tests/linux_kernel/helpers/test_slab.py#L81
Fixes: c69ff4071935 ("filelock: split leases out of struct file_lock")
Signed-off-by: Omar Sandoval <osandov@fb.com>
---
fs/locks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/locks.c b/fs/locks.c
index 9afb16e0683f..e45cad40f8b6 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2984,7 +2984,7 @@ static int __init filelock_init(void)
filelock_cache = kmem_cache_create("file_lock_cache",
sizeof(struct file_lock), 0, SLAB_PANIC, NULL);
- filelease_cache = kmem_cache_create("file_lock_cache",
+ filelease_cache = kmem_cache_create("file_lease_cache",
sizeof(struct file_lease), 0, SLAB_PANIC, NULL);
for_each_possible_cpu(i) {
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] filelock: fix name of file_lease slab cache
2024-07-29 22:48 [PATCH] filelock: fix name of file_lease slab cache Omar Sandoval
@ 2024-07-30 9:00 ` Christian Brauner
2024-07-30 10:14 ` Jeff Layton
2024-07-30 13:47 ` Chuck Lever
2 siblings, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2024-07-30 9:00 UTC (permalink / raw)
To: Jeff Layton, Chuck Lever, Omar Sandoval
Cc: Christian Brauner, Alexander Aring, linux-fsdevel, kernel-team
On Mon, 29 Jul 2024 15:48:12 -0700, Omar Sandoval wrote:
> When struct file_lease was split out from struct file_lock, the name of
> the file_lock slab cache was copied to the new slab cache for
> file_lease. This name conflict causes confusion in /proc/slabinfo and
> /sys/kernel/slab. In particular, it caused failures in drgn's test case
> for slab cache merging.
>
>
> [...]
Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes
[1/1] filelock: fix name of file_lease slab cache
https://git.kernel.org/vfs/vfs/c/af1e6ab8c0e5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] filelock: fix name of file_lease slab cache
2024-07-29 22:48 [PATCH] filelock: fix name of file_lease slab cache Omar Sandoval
2024-07-30 9:00 ` Christian Brauner
@ 2024-07-30 10:14 ` Jeff Layton
2024-07-30 13:47 ` Chuck Lever
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2024-07-30 10:14 UTC (permalink / raw)
To: Omar Sandoval, Chuck Lever; +Cc: Alexander Aring, linux-fsdevel, kernel-team
On Mon, 2024-07-29 at 15:48 -0700, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
>
> When struct file_lease was split out from struct file_lock, the name of
> the file_lock slab cache was copied to the new slab cache for
> file_lease. This name conflict causes confusion in /proc/slabinfo and
> /sys/kernel/slab. In particular, it caused failures in drgn's test case
> for slab cache merging.
>
> Link: https://github.com/osandov/drgn/blob/9ad29fd86499eb32847473e928b6540872d3d59a/tests/linux_kernel/helpers/test_slab.py#L81
> Fixes: c69ff4071935 ("filelock: split leases out of struct file_lock")
> Signed-off-by: Omar Sandoval <osandov@fb.com>
> ---
> fs/locks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/locks.c b/fs/locks.c
> index 9afb16e0683f..e45cad40f8b6 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -2984,7 +2984,7 @@ static int __init filelock_init(void)
> filelock_cache = kmem_cache_create("file_lock_cache",
> sizeof(struct file_lock), 0, SLAB_PANIC, NULL);
>
> - filelease_cache = kmem_cache_create("file_lock_cache",
> + filelease_cache = kmem_cache_create("file_lease_cache",
> sizeof(struct file_lease), 0, SLAB_PANIC, NULL);
>
> for_each_possible_cpu(i) {
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] filelock: fix name of file_lease slab cache
2024-07-29 22:48 [PATCH] filelock: fix name of file_lease slab cache Omar Sandoval
2024-07-30 9:00 ` Christian Brauner
2024-07-30 10:14 ` Jeff Layton
@ 2024-07-30 13:47 ` Chuck Lever
2 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2024-07-30 13:47 UTC (permalink / raw)
To: Omar Sandoval; +Cc: Jeff Layton, Alexander Aring, linux-fsdevel, kernel-team
On Mon, Jul 29, 2024 at 03:48:12PM -0700, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
>
> When struct file_lease was split out from struct file_lock, the name of
> the file_lock slab cache was copied to the new slab cache for
> file_lease. This name conflict causes confusion in /proc/slabinfo and
> /sys/kernel/slab. In particular, it caused failures in drgn's test case
> for slab cache merging.
>
> Link: https://github.com/osandov/drgn/blob/9ad29fd86499eb32847473e928b6540872d3d59a/tests/linux_kernel/helpers/test_slab.py#L81
> Fixes: c69ff4071935 ("filelock: split leases out of struct file_lock")
> Signed-off-by: Omar Sandoval <osandov@fb.com>
> ---
> fs/locks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/locks.c b/fs/locks.c
> index 9afb16e0683f..e45cad40f8b6 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -2984,7 +2984,7 @@ static int __init filelock_init(void)
> filelock_cache = kmem_cache_create("file_lock_cache",
> sizeof(struct file_lock), 0, SLAB_PANIC, NULL);
>
> - filelease_cache = kmem_cache_create("file_lock_cache",
> + filelease_cache = kmem_cache_create("file_lease_cache",
> sizeof(struct file_lease), 0, SLAB_PANIC, NULL);
>
> for_each_possible_cpu(i) {
> --
> 2.45.2
>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
--
Chuck Lever
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-30 13:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-29 22:48 [PATCH] filelock: fix name of file_lease slab cache Omar Sandoval
2024-07-30 9:00 ` Christian Brauner
2024-07-30 10:14 ` Jeff Layton
2024-07-30 13:47 ` Chuck Lever
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).