* [PATCH] ext4: remove redundant variable has_bigalloc in ext4_fill_super
@ 2020-04-15 7:25 xiakaixu1987
2020-04-15 18:15 ` Andreas Dilger
2020-05-14 14:20 ` Theodore Y. Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: xiakaixu1987 @ 2020-04-15 7:25 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso, adilger.kernel, Kaixu Xia
From: Kaixu Xia <kaixuxia@tencent.com>
We can use the ext4_has_feature_bigalloc() function directly to check
bigalloc feature and the variable has_bigalloc is reduncant, so remove
it.
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
fs/ext4/super.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 855874ea4b29..60bb3991304e 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3681,7 +3681,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
int blocksize, clustersize;
unsigned int db_count;
unsigned int i;
- int needs_recovery, has_huge_files, has_bigalloc;
+ int needs_recovery, has_huge_files;
__u64 blocks_count;
int err = 0;
unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO;
@@ -4196,8 +4196,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
/* Handle clustersize */
clustersize = BLOCK_SIZE << le32_to_cpu(es->s_log_cluster_size);
- has_bigalloc = ext4_has_feature_bigalloc(sb);
- if (has_bigalloc) {
+ if (ext4_has_feature_bigalloc(sb)) {
if (clustersize < blocksize) {
ext4_msg(sb, KERN_ERR,
"cluster size (%d) smaller than "
--
2.20.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: remove redundant variable has_bigalloc in ext4_fill_super
2020-04-15 7:25 [PATCH] ext4: remove redundant variable has_bigalloc in ext4_fill_super xiakaixu1987
@ 2020-04-15 18:15 ` Andreas Dilger
2020-05-14 14:20 ` Theodore Y. Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Dilger @ 2020-04-15 18:15 UTC (permalink / raw)
To: xiakaixu1987; +Cc: linux-ext4, Theodore Ts'o, Kaixu Xia
[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]
On Apr 15, 2020, at 1:25 AM, xiakaixu1987@gmail.com wrote:
>
> From: Kaixu Xia <kaixuxia@tencent.com>
>
> We can use the ext4_has_feature_bigalloc() function directly to check
> bigalloc feature and the variable has_bigalloc is reduncant, so remove
> it.
>
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
> ---
> fs/ext4/super.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 855874ea4b29..60bb3991304e 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -3681,7 +3681,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
> int blocksize, clustersize;
> unsigned int db_count;
> unsigned int i;
> - int needs_recovery, has_huge_files, has_bigalloc;
> + int needs_recovery, has_huge_files;
> __u64 blocks_count;
> int err = 0;
> unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO;
> @@ -4196,8 +4196,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>
> /* Handle clustersize */
> clustersize = BLOCK_SIZE << le32_to_cpu(es->s_log_cluster_size);
> - has_bigalloc = ext4_has_feature_bigalloc(sb);
> - if (has_bigalloc) {
> + if (ext4_has_feature_bigalloc(sb)) {
> if (clustersize < blocksize) {
> ext4_msg(sb, KERN_ERR,
> "cluster size (%d) smaller than "
> --
> 2.20.0
>
Cheers, Andreas
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: remove redundant variable has_bigalloc in ext4_fill_super
2020-04-15 7:25 [PATCH] ext4: remove redundant variable has_bigalloc in ext4_fill_super xiakaixu1987
2020-04-15 18:15 ` Andreas Dilger
@ 2020-05-14 14:20 ` Theodore Y. Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Y. Ts'o @ 2020-05-14 14:20 UTC (permalink / raw)
To: xiakaixu1987; +Cc: linux-ext4, adilger.kernel, Kaixu Xia
On Wed, Apr 15, 2020 at 03:25:42PM +0800, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
>
> We can use the ext4_has_feature_bigalloc() function directly to check
> bigalloc feature and the variable has_bigalloc is reduncant, so remove
> it.
>
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
> Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-14 14:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 7:25 [PATCH] ext4: remove redundant variable has_bigalloc in ext4_fill_super xiakaixu1987
2020-04-15 18:15 ` Andreas Dilger
2020-05-14 14:20 ` Theodore Y. Ts'o
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.