]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ext4: clean up s_mb_rb_lock to fix build warnings with C=1
authorBaokun Li <libaokun1@huawei.com>
Tue, 19 Mar 2024 11:33:25 +0000 (19:33 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 3 May 2024 03:48:31 +0000 (23:48 -0400)
Running sparse (make C=1) on mballoc.c we get the following warning:

 fs/ext4/mballoc.c:3194:13: warning: context imbalance in
  'ext4_mb_seq_structs_summary_start' - wrong count at exit

This is because __acquires(&EXT4_SB(sb)->s_mb_rb_lock) was called in
ext4_mb_seq_structs_summary_start(), but s_mb_rb_lock was removed in commit
83e80a6e3543 ("ext4: use buckets for cr 1 block scan instead of rbtree"),
so remove the __acquires to silence the warning.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240319113325.3110393-10-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c

index dbf04f91516cfcecd8e2aa84cafeced7bc24cb92..c65fac9b8c72f698dece7b563a34a455b487ec1d 100644 (file)
@@ -3190,7 +3190,6 @@ int ext4_seq_mb_stats_show(struct seq_file *seq, void *offset)
 }
 
 static void *ext4_mb_seq_structs_summary_start(struct seq_file *seq, loff_t *pos)
-__acquires(&EXT4_SB(sb)->s_mb_rb_lock)
 {
        struct super_block *sb = pde_data(file_inode(seq->file));
        unsigned long position;