diff mbox series

filelock: fix name of file_lease slab cache

Message ID 2d1d053da1cafb3e7940c4f25952da4f0af34e38.1722293276.git.osandov@fb.com (mailing list archive)
State New
Headers show
Series filelock: fix name of file_lease slab cache | expand

Commit Message

Omar Sandoval July 29, 2024, 10:48 p.m. UTC
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(-)

Comments

Christian Brauner July 30, 2024, 9 a.m. UTC | #1
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
Jeff Layton July 30, 2024, 10:14 a.m. UTC | #2
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>
Chuck Lever III July 30, 2024, 1:47 p.m. UTC | #3
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>
diff mbox series

Patch

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) {