diff mbox series

ext2: change reusable parameter to true when calling mb_cache_entry_create()

Message ID 20181115064008.21056-1-cgxu519@gmx.com
State Not Applicable
Headers show
Series ext2: change reusable parameter to true when calling mb_cache_entry_create() | expand

Commit Message

cgxu519 Nov. 15, 2018, 6:40 a.m. UTC
Reusable parameter of mb_cache_entry_create() is bool type,
so it's better to set true instead of 1.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
---
 fs/ext2/xattr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jan Kara Nov. 15, 2018, 4:26 p.m. UTC | #1
On Thu 15-11-18 14:40:08, Chengguang Xu wrote:
> Reusable parameter of mb_cache_entry_create() is bool type,
> so it's better to set true instead of 1.
> 
> Signed-off-by: Chengguang Xu <cgxu519@gmx.com>

Applied after fixing the whitespace damage. Thanks.

								Honza

> ---
>  fs/ext2/xattr.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
> index 62d9a659a8ff..6bab2432b717 100644
> --- a/fs/ext2/xattr.c
> +++ b/fs/ext2/xattr.c
> @@ -835,7 +835,8 @@ ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh)
>  	__u32 hash = le32_to_cpu(HDR(bh)->h_hash);
>  	int error;
>  
> -	error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr, 1);
> +	error = mb_cache_entry_create(cache, GFP_NOFS, hash,
> +					bh->b_blocknr,true);
>  	if (error) {
>  		if (error == -EBUSY) {
>  			ea_bdebug(bh, "already in cache (%d cache entries)",
> -- 
> 2.17.2
> 
>
diff mbox series

Patch

diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
index 62d9a659a8ff..6bab2432b717 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
@@ -835,7 +835,8 @@  ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh)
 	__u32 hash = le32_to_cpu(HDR(bh)->h_hash);
 	int error;
 
-	error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr, 1);
+	error = mb_cache_entry_create(cache, GFP_NOFS, hash,
+					bh->b_blocknr,true);
 	if (error) {
 		if (error == -EBUSY) {
 			ea_bdebug(bh, "already in cache (%d cache entries)",