ANDROID: fs/f2fs: fixup __f2fs_cluster_blocks with F2FS_FS_COMPRESSION

Commit 3cf0f8245d introduced `inode` as
a parameter to F2FS_I_SB() but never declared from where it was
supposed to be accessed from.

This leads to a compile error with CONFIG_F2FS_FS_COMPRESSION enabled:

In file included from fs/f2fs/compress.c:17:
fs/f2fs/compress.c: In function '__f2fs_cluster_blocks':
fs/f2fs/compress.c:813:39: error: 'inode' undeclared (first use in this function)
  813 |                 f2fs_bug_on(F2FS_I_SB(inode),
      |                                       ^~~~~
fs/f2fs/f2fs.h:38:38: note: in definition of macro 'f2fs_bug_on'
   38 |                         set_sbi_flag(sbi, SBI_NEED_FSCK);               \
      |                                      ^~~
fs/f2fs/compress.c:813:39: note: each undeclared identifier is reported only once for each function it appears in
  813 |                 f2fs_bug_on(F2FS_I_SB(inode),
      |                                       ^~~~~
fs/f2fs/f2fs.h:38:38: note: in definition of macro 'f2fs_bug_on'
   38 |                         set_sbi_flag(sbi, SBI_NEED_FSCK);               \
      |

Test: Enable CONFIG_F2FS_FS_COMPRESSION, check compile.
Fixes: 3cf0f8245d ("BACKPORT: f2fs: compress: remove unneeded preallocation")
Change-Id: I40015a66b8b872c86ff782b30581b24f752bb19a
Signed-off-by: Vaisakh Murali <vaisakhmurali@gmail.com>
This commit is contained in:
Vaisakh Murali 2023-03-01 12:27:17 +00:00
parent 9f71ba69cd
commit b62f2af118
No known key found for this signature in database
GPG Key ID: 656D1CD547ECAB77

View File

@ -810,7 +810,7 @@ static int __f2fs_cluster_blocks(struct compress_ctx *cc, bool compr)
}
}
f2fs_bug_on(F2FS_I_SB(inode),
f2fs_bug_on(F2FS_I_SB(cc->inode),
!compr && ret != cc->cluster_size &&
!is_inode_flag_set(cc->inode, FI_COMPRESS_RELEASED));
}