mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ext2: annotate ext2_update_dynamic_rev() as requiring s_lock
ext2_update_dynamic_rev() modifies several fields within 'struct ext2_super_block' and is already documented as requiring s_lock. Express that with __must_hold() for Clang's context analysis. Both callers ext2_xattr_update_super_block() and __ext2_write_inode() already hold s_lock. Signed-off-by: Timothy Day <timday@thelustrecollective.com> Acked-by: Marco Elver <elver@google.com> Link: https://patch.msgid.link/20260811160336.782342-3-timday@thelustrecollective.com Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
e76ed86ee8
commit
eb34d14371
|
|
@ -761,7 +761,8 @@ extern __printf(3, 4)
|
|||
void ext2_error(struct super_block *, const char *, const char *, ...);
|
||||
extern __printf(3, 4)
|
||||
void ext2_msg(struct super_block *, const char *, const char *, ...);
|
||||
extern void ext2_update_dynamic_rev (struct super_block *sb);
|
||||
extern void ext2_update_dynamic_rev(struct super_block *sb)
|
||||
__must_hold(&EXT2_SB(sb)->s_lock);
|
||||
extern void ext2_sync_super(struct super_block *sb, struct ext2_super_block *es,
|
||||
int wait);
|
||||
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ void ext2_msg(struct super_block *sb, const char *prefix,
|
|||
* This must be called with sbi->s_lock held.
|
||||
*/
|
||||
void ext2_update_dynamic_rev(struct super_block *sb)
|
||||
__must_hold(&EXT2_SB(sb)->s_lock)
|
||||
{
|
||||
struct ext2_super_block *es = EXT2_SB(sb)->s_es;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user