Skip to contentSkip to conversation

blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion

PATCH Applied Eric Biggers 3 participants 3 messages Sep 14, 2016 – Sep 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion

An obsolete comment and extra parentheses were left over from when the sb_bgl_lock() macro was replaced with the bgl_lock_ptr() function.

---
 include/linux/blockgroup_lock.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
include/linux/blockgroup_lock.h +1 -5
index e44b88b..61b583d 100644
@@ -49,14 +49,10 @@ static inline void bgl_lock_init(struct blockgroup_lock *bgl)
 		spin_lock_init(&bgl->locks[i].lock);
 }
 
-/*
- * The accessor is a macro so we can embed a blockgroup_lock into different
- * superblock types
- */
 static inline spinlock_t *
 bgl_lock_ptr(struct blockgroup_lock *bgl, unsigned int block_group)
 {
-	return &bgl->locks[(block_group) & (NR_BG_LOCKS-1)].lock;
+	return &bgl->locks[block_group & (NR_BG_LOCKS-1)].lock;
 }
 
 #endif
Signature · 1 line
2.8.0.rc3.226.g39d4020
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Eric Biggers

An obsolete comment and extra parentheses were left over from when the sb_bgl_lock() macro was replaced with the bgl_lock_ptr() function.

Quoted 23 lines

---
include/linux/blockgroup_lock.h | 6 +-----

1 file changed, 1 insertion(+), 5 deletions(-)
include/linux/blockgroup_lock.h +0 -4
index e44b88b..61b583d 100644
@@ -49,14 +49,10 @@ static inline void bgl_lock_init(struct blockgroup_lock *bgl)
 		spin_lock_init(&bgl->locks[i].lock);
 }
 
-/*
- * The accessor is a macro so we can embed a blockgroup_lock into different
- * superblock types
- */

static inline spinlock_t *
bgl_lock_ptr(struct blockgroup_lock *bgl, unsigned int block_group) {

include/linux/blockgroup_lock.h +1 -1
-	return &bgl->locks[(block_group) & (NR_BG_LOCKS-1)].lock;
+	return &bgl->locks[block_group & (NR_BG_LOCKS-1)].lock;

}

Quoted 4 lines

#endif
--
2.8.0.rc3.226.g39d4020

Cheers, Andreas