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.rag...@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 <w...@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);

Reply via email to