* [PATCH] fs: btrfs: remove the usage of undeclared fs_mutex variable
[not found] <CGME20220927095545eucas1p26409580e62ae68efd478387444c9fc6a@eucas1p2.samsung.com>
@ 2022-09-27 9:55 ` Pankaj Raghav
2022-09-27 10:39 ` Qu Wenruo
0 siblings, 1 reply; 5+ messages in thread
From: Pankaj Raghav @ 2022-09-27 9:55 UTC (permalink / raw)
To: kabel, Qu Wenruo; +Cc: u-boot, Pankaj Raghav, Pankaj Raghav
This line probably got in by mistake as there is no fs_mutex member in
the btrfs_fs_info struct.
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
fs/btrfs/disk-io.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 8043abc1bd..c80f8e8028 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -782,8 +782,6 @@ struct btrfs_fs_info *btrfs_new_fs_info(void)
fs_info->fs_root_tree = RB_ROOT;
cache_tree_init(&fs_info->mapping_tree.cache_tree);
- mutex_init(&fs_info->fs_mutex);
-
return fs_info;
free_all:
btrfs_free_fs_info(fs_info);
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] fs: btrfs: remove the usage of undeclared fs_mutex variable
2022-09-27 9:55 ` [PATCH] fs: btrfs: remove the usage of undeclared fs_mutex variable Pankaj Raghav
@ 2022-09-27 10:39 ` Qu Wenruo
2022-09-27 10:46 ` Qu Wenruo
2022-09-27 10:49 ` Pankaj Raghav
0 siblings, 2 replies; 5+ messages in thread
From: Qu Wenruo @ 2022-09-27 10:39 UTC (permalink / raw)
To: Pankaj Raghav, kabel; +Cc: u-boot, Pankaj Raghav
On 2022/9/27 17:55, Pankaj Raghav wrote:
> This line probably got in by mistake as there is no fs_mutex member in
> the btrfs_fs_info struct.
>
> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Which branch is the code based on?
I don't believe it's upstream, as such compiling error should be exposed
very easily.
> ---
> fs/btrfs/disk-io.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
Furthermore at current upstream HEAD a1375562c0a8 ("Merge tag
'x86_urgent_for_v6.0-rc8' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip"), there is no
btrfs_new_fs_info() function defined anyway.
THanks,
Qu
> index 8043abc1bd..c80f8e8028 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -782,8 +782,6 @@ struct btrfs_fs_info *btrfs_new_fs_info(void)
> fs_info->fs_root_tree = RB_ROOT;
> cache_tree_init(&fs_info->mapping_tree.cache_tree);
>
> - mutex_init(&fs_info->fs_mutex);
> -
> return fs_info;
> free_all:
> btrfs_free_fs_info(fs_info);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fs: btrfs: remove the usage of undeclared fs_mutex variable
2022-09-27 10:39 ` Qu Wenruo
@ 2022-09-27 10:46 ` Qu Wenruo
2022-09-27 10:49 ` Pankaj Raghav
1 sibling, 0 replies; 5+ messages in thread
From: Qu Wenruo @ 2022-09-27 10:46 UTC (permalink / raw)
To: u-boot
On 2022/9/27 18:39, Qu Wenruo wrote:
>
>
> On 2022/9/27 17:55, Pankaj Raghav wrote:
>> This line probably got in by mistake as there is no fs_mutex member in
>> the btrfs_fs_info struct.
>>
>> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
>
> Which branch is the code based on?
>
> I don't believe it's upstream, as such compiling error should be exposed
> very easily.
>
>> ---
>> fs/btrfs/disk-io.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
>
> Furthermore at current upstream HEAD a1375562c0a8 ("Merge tag
> 'x86_urgent_for_v6.0-rc8' of
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip"), there is no
> btrfs_new_fs_info() function defined anyway.
My bad, I didn't notice it's for Uboot, not kernel.
In that case, you can safely remove it, but it won't cause compile error
since in <linux/compat.h>, we define mutex_init() as noop, thus it
doesn't cause any compile error.
Anyway the patch itself looks good, I also checked if there is other
mutex related usage, and this is the only one.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
>
> THanks,
> Qu
>
>> index 8043abc1bd..c80f8e8028 100644
>> --- a/fs/btrfs/disk-io.c
>> +++ b/fs/btrfs/disk-io.c
>> @@ -782,8 +782,6 @@ struct btrfs_fs_info *btrfs_new_fs_info(void)
>> fs_info->fs_root_tree = RB_ROOT;
>> cache_tree_init(&fs_info->mapping_tree.cache_tree);
>> - mutex_init(&fs_info->fs_mutex);
>> -
>> return fs_info;
>> free_all:
>> btrfs_free_fs_info(fs_info);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fs: btrfs: remove the usage of undeclared fs_mutex variable
2022-09-27 10:39 ` Qu Wenruo
2022-09-27 10:46 ` Qu Wenruo
@ 2022-09-27 10:49 ` Pankaj Raghav
2022-09-27 10:54 ` Qu Wenruo
1 sibling, 1 reply; 5+ messages in thread
From: Pankaj Raghav @ 2022-09-27 10:49 UTC (permalink / raw)
To: Qu Wenruo, kabel; +Cc: u-boot, Pankaj Raghav
> Which branch is the code based on?
>
I actually cloned it from u-boot github master.
https://github.com/u-boot/u-boot/blob/f117c54cc83e3c519883edb5a48062644d38c443/fs/btrfs/disk-io.c#L785
> I don't believe it's upstream, as such compiling error should be exposed
> very easily.
>
Actually, I was also surprised but the compiler did not give me any error
because the mutex definition was as follows:
#define mutex_init(...)
and the compiler did not generate any error because we don't do anything
the parameter.
>> ---
>> fs/btrfs/disk-io.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
>
> Furthermore at current upstream HEAD a1375562c0a8 ("Merge tag
> 'x86_urgent_for_v6.0-rc8' of
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip"), there is no
> btrfs_new_fs_info() function defined anyway.
>
Hmm, I sent these patches for u-boot. Maybe there is a misunderstanding
here? :)
> THanks,
> Qu
>
>> index 8043abc1bd..c80f8e8028 100644
>> --- a/fs/btrfs/disk-io.c
>> +++ b/fs/btrfs/disk-io.c
>> @@ -782,8 +782,6 @@ struct btrfs_fs_info *btrfs_new_fs_info(void)
>> fs_info->fs_root_tree = RB_ROOT;
>> cache_tree_init(&fs_info->mapping_tree.cache_tree);
>> - mutex_init(&fs_info->fs_mutex);
>> -
>> return fs_info;
>> free_all:
>> btrfs_free_fs_info(fs_info);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fs: btrfs: remove the usage of undeclared fs_mutex variable
2022-09-27 10:49 ` Pankaj Raghav
@ 2022-09-27 10:54 ` Qu Wenruo
0 siblings, 0 replies; 5+ messages in thread
From: Qu Wenruo @ 2022-09-27 10:54 UTC (permalink / raw)
To: Pankaj Raghav, kabel; +Cc: u-boot, Pankaj Raghav
On 2022/9/27 18:49, Pankaj Raghav wrote:
>
>
>> Which branch is the code based on?
>>
> I actually cloned it from u-boot github master.
> https://github.com/u-boot/u-boot/blob/f117c54cc83e3c519883edb5a48062644d38c443/fs/btrfs/disk-io.c#L785
>
>> I don't believe it's upstream, as such compiling error should be exposed
>> very easily.
>>
> Actually, I was also surprised but the compiler did not give me any error
> because the mutex definition was as follows:
> #define mutex_init(...)
>
> and the compiler did not generate any error because we don't do anything
> the parameter.
>
>>> ---
>>> fs/btrfs/disk-io.c | 2 --
>>> 1 file changed, 2 deletions(-)
>>>
>>> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
>>
>> Furthermore at current upstream HEAD a1375562c0a8 ("Merge tag
>> 'x86_urgent_for_v6.0-rc8' of
>> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip"), there is no
>> btrfs_new_fs_info() function defined anyway.
>>
> Hmm, I sent these patches for u-boot. Maybe there is a misunderstanding
> here? :)
Yeah, you're completely right, I thought it's for kernel by default...
Sorry for the confusion.
Qu
>
>> THanks,
>> Qu
>>
>>> index 8043abc1bd..c80f8e8028 100644
>>> --- a/fs/btrfs/disk-io.c
>>> +++ b/fs/btrfs/disk-io.c
>>> @@ -782,8 +782,6 @@ struct btrfs_fs_info *btrfs_new_fs_info(void)
>>> fs_info->fs_root_tree = RB_ROOT;
>>> cache_tree_init(&fs_info->mapping_tree.cache_tree);
>>> - mutex_init(&fs_info->fs_mutex);
>>> -
>>> return fs_info;
>>> free_all:
>>> btrfs_free_fs_info(fs_info);
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-27 11:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20220927095545eucas1p26409580e62ae68efd478387444c9fc6a@eucas1p2.samsung.com>
2022-09-27 9:55 ` [PATCH] fs: btrfs: remove the usage of undeclared fs_mutex variable Pankaj Raghav
2022-09-27 10:39 ` Qu Wenruo
2022-09-27 10:46 ` Qu Wenruo
2022-09-27 10:49 ` Pankaj Raghav
2022-09-27 10:54 ` Qu Wenruo
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.