Skip to content

Commit fa329e2

Browse files
committed
ext4: fix sparse warnings in fast_commit code
Add missing __acquire() and __releases() annotations, and make fc_ineligible_reasons[] static, as it is not used outside of fs/ext4/fast_commit.c. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 99c880d commit fa329e2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

fs/ext4/fast_commit.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ void ext4_fc_init_inode(struct inode *inode)
156156

157157
/* This function must be called with sbi->s_fc_lock held. */
158158
static void ext4_fc_wait_committing_inode(struct inode *inode)
159+
__releases(&EXT4_SB(inode->i_sb)->s_fc_lock)
159160
{
160161
wait_queue_head_t *wq;
161162
struct ext4_inode_info *ei = EXT4_I(inode);
@@ -911,6 +912,8 @@ static int ext4_fc_wait_inode_data_all(journal_t *journal)
911912

912913
/* Commit all the directory entry updates */
913914
static int ext4_fc_commit_dentry_updates(journal_t *journal, u32 *crc)
915+
__acquires(&sbi->s_fc_lock)
916+
__releases(&sbi->s_fc_lock)
914917
{
915918
struct super_block *sb = (struct super_block *)(journal->j_private);
916919
struct ext4_sb_info *sbi = EXT4_SB(sb);
@@ -2106,7 +2109,7 @@ void ext4_fc_init(struct super_block *sb, journal_t *journal)
21062109
journal->j_fc_cleanup_callback = ext4_fc_cleanup;
21072110
}
21082111

2109-
const char *fc_ineligible_reasons[] = {
2112+
static const char *fc_ineligible_reasons[] = {
21102113
"Extended attributes changed",
21112114
"Cross rename",
21122115
"Journal flag changed",

0 commit comments

Comments
 (0)