* [PATCH] ext2: change reusable parameter to true when calling mb_cache_entry_create()
@ 2018-11-15 6:40 Chengguang Xu
2018-11-15 16:26 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2018-11-15 6:40 UTC (permalink / raw)
To: jack; +Cc: linux-ext4, Chengguang Xu
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(-)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext2: change reusable parameter to true when calling mb_cache_entry_create()
2018-11-15 6:40 [PATCH] ext2: change reusable parameter to true when calling mb_cache_entry_create() Chengguang Xu
@ 2018-11-15 16:26 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2018-11-15 16:26 UTC (permalink / raw)
To: Chengguang Xu; +Cc: jack, linux-ext4
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
>
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-16 2:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 6:40 [PATCH] ext2: change reusable parameter to true when calling mb_cache_entry_create() Chengguang Xu
2018-11-15 16:26 ` Jan Kara
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.