diff mbox series

ext4: cleanup variable name in ext4_fc_del()

Message ID 96008557-8ff4-44cc-b5e3-ce242212f1a3@stanley.mountain
State Awaiting Upstream
Headers show
Series ext4: cleanup variable name in ext4_fc_del() | expand

Commit Message

Dan Carpenter Oct. 11, 2024, 7:43 p.m. UTC
The variables "&EXT4_SB(inode->i_sb)->s_fc_lock" and "&sbi->s_fc_lock"
are the same lock.  This function uses a mix of both, which is a bit
unsightly and confuses Smatch.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 fs/ext4/fast_commit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Theodore Ts'o Nov. 14, 2024, 1:53 p.m. UTC | #1
On Fri, 11 Oct 2024 22:43:44 +0300, Dan Carpenter wrote:
> The variables "&EXT4_SB(inode->i_sb)->s_fc_lock" and "&sbi->s_fc_lock"
> are the same lock.  This function uses a mix of both, which is a bit
> unsightly and confuses Smatch.
> 
> 

Applied, thanks!

[1/1] ext4: cleanup variable name in ext4_fc_del()
      commit: 27349b4d2ed072cabedd5115f0542b3b7b538aa8

Best regards,
diff mbox series

Patch

diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
index b33664f6ce2a..e4cb1356e9b6 100644
--- a/fs/ext4/fast_commit.c
+++ b/fs/ext4/fast_commit.c
@@ -291,9 +291,9 @@  void ext4_fc_del(struct inode *inode)
 		return;
 
 restart:
-	spin_lock(&EXT4_SB(inode->i_sb)->s_fc_lock);
+	spin_lock(&sbi->s_fc_lock);
 	if (list_empty(&ei->i_fc_list) && list_empty(&ei->i_fc_dilist)) {
-		spin_unlock(&EXT4_SB(inode->i_sb)->s_fc_lock);
+		spin_unlock(&sbi->s_fc_lock);
 		return;
 	}