Skip to contentSkip to conversation

use local variables ei instead of invoking function EXT4_I

PATCH Applied chenyichong 3 participants 3 messages May 26, 2021 – Jun 17, 2021 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use local variables ei instead of invoking function EXT4_I

---
 fs/ext4/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/inode.c +1 -1
index fe6045a46599..a5c4cd1c757b 100644
@@ -374,7 +374,7 @@ void ext4_da_update_reserve_space(struct inode *inode,
 	ei->i_reserved_data_blocks -= used;
 	percpu_counter_sub(&sbi->s_dirtyclusters_counter, used);
 
-	spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
+	spin_unlock(&ei->i_block_reservation_lock);
 
 	/* Update quota subsystem for data blocks */
 	if (quota_claim)
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

On 21/05/26 01:29PM, chenyichong wrote:

Thanks for the patch. Looks good to me.
Feel free to add

Quoted 23 lines
---
 fs/ext4/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/inode.c +1 -2
index fe6045a46599..a5c4cd1c757b 100644
@@ -374,7 +374,7 @@ void ext4_da_update_reserve_space(struct inode *inode,
 	ei->i_reserved_data_blocks -= used;
 	percpu_counter_sub(&sbi->s_dirtyclusters_counter, used);
 
-	spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
+	spin_unlock(&ei->i_block_reservation_lock);
 
 	/* Update quota subsystem for data blocks */
 	if (quota_claim)
--

2.20.1