Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1483578 > unrolled thread

[PATCH] blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion

Started byEric Biggers <ebiggers@google.com>
First post2016-09-14 21:30 +0200
Last post2016-09-16 00:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion Eric Biggers <ebiggers@google.com> - 2016-09-14 21:30 +0200
    Re: [PATCH] blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion Andreas Dilger <adilger@dilger.ca> - 2016-09-14 23:10 +0200
    Re: [PATCH] blockgroup_lock.h: remove debris from bgl_lock_ptr()  conversion Theodore Ts'o <tytso@mit.edu> - 2016-09-16 00:30 +0200

#1483578 — [PATCH] blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion

FromEric Biggers <ebiggers@google.com>
Date2016-09-14 21:30 +0200
Subject[PATCH] blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion
Message-ID<sho2C-4RD-19@gated-at.bofh.it>
An obsolete comment and extra parentheses were left over from when the
sb_bgl_lock() macro was replaced with the bgl_lock_ptr() function.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 include/linux/blockgroup_lock.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/linux/blockgroup_lock.h b/include/linux/blockgroup_lock.h
index e44b88b..61b583d 100644
--- a/include/linux/blockgroup_lock.h
+++ b/include/linux/blockgroup_lock.h
@@ -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
-- 
2.8.0.rc3.226.g39d4020

[toc] | [next] | [standalone]


#1483668

FromAndreas Dilger <adilger@dilger.ca>
Date2016-09-14 23:10 +0200
Message-ID<shpBn-665-15@gated-at.bofh.it>
In reply to#1483578

[Multipart message — attachments visible in raw view] — view raw

On Sep 14, 2016, at 1:27 PM, Eric Biggers <ebiggers@google.com> wrote:
> 
> An obsolete comment and extra parentheses were left over from when the
> sb_bgl_lock() macro was replaced with the bgl_lock_ptr() function.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Reviewed-by: Andreas Dilger <adilger@dilger.ca>

> ---
> include/linux/blockgroup_lock.h | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/include/linux/blockgroup_lock.h b/include/linux/blockgroup_lock.h
> index e44b88b..61b583d 100644
> --- a/include/linux/blockgroup_lock.h
> +++ b/include/linux/blockgroup_lock.h
> @@ -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
> --
> 2.8.0.rc3.226.g39d4020
> 


Cheers, Andreas





[toc] | [prev] | [next] | [standalone]


#1484580 — Re: [PATCH] blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion

FromTheodore Ts'o <tytso@mit.edu>
Date2016-09-16 00:30 +0200
SubjectRe: [PATCH] blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion
Message-ID<shNkl-4te-19@gated-at.bofh.it>
In reply to#1483578
On Wed, Sep 14, 2016 at 12:27:59PM -0700, Eric Biggers wrote:
> An obsolete comment and extra parentheses were left over from when the
> sb_bgl_lock() macro was replaced with the bgl_lock_ptr() function.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Applied, thanks.

						- Ted

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web