Debian Codegraph @

vmtest/patches/filelock-fix-name-of-file_lease-slab-cache.patch

raw
1 From 3f65f3c099bcb27949e712f39ba836f21785924a Mon Sep 17 00:00:00 2001
2 Message-ID: <3f65f3c099bcb27949e712f39ba836f21785924a.1728320011.git.osandov@fb.com>
3 From: Omar Sandoval <[email protected]>
4 Date: Mon, 29 Jul 2024 15:48:12 -0700
5 Subject: [PATCH] filelock: fix name of file_lease slab cache
6
7 When struct file_lease was split out from struct file_lock, the name of
8 the file_lock slab cache was copied to the new slab cache for
9 file_lease. This name conflict causes confusion in /proc/slabinfo and
10 /sys/kernel/slab. In particular, it caused failures in drgn's test case
11 for slab cache merging.
12
13 Link: https://github.com/osandov/drgn/blob/9ad29fd86499eb32847473e928b6540872d3d59a/tests/linux_kernel/helpers/test_slab.py#L81
14 Fixes: c69ff4071935 ("filelock: split leases out of struct file_lock")
15 Signed-off-by: Omar Sandoval <[email protected]>
16 Link: https://lore.kernel.org/r/2d1d053da1cafb3e7940c4f25952da4f0af34e38.1722293276.git.osandov@fb.com
17 Reviewed-by: Chuck Lever <[email protected]>
18 Reviewed-by: Jeff Layton <[email protected]>
19 Signed-off-by: Christian Brauner <[email protected]>
20 ---
21 fs/locks.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 diff --git a/fs/locks.c b/fs/locks.c
25 index 9afb16e0683f..e45cad40f8b6 100644
26 --- a/fs/locks.c
27 +++ b/fs/locks.c
28 @@ -2984,7 +2984,7 @@ static int __init filelock_init(void)
29 filelock_cache = kmem_cache_create("file_lock_cache",
30 sizeof(struct file_lock), 0, SLAB_PANIC, NULL);
31
32 - filelease_cache = kmem_cache_create("file_lock_cache",
33 + filelease_cache = kmem_cache_create("file_lease_cache",
34 sizeof(struct file_lease), 0, SLAB_PANIC, NULL);
35
36 for_each_possible_cpu(i) {
37 --
38 2.46.2
39