Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit b62f2af1 authored by Vaisakh Murali's avatar Vaisakh Murali
Browse files

ANDROID: fs/f2fs: fixup __f2fs_cluster_blocks with F2FS_FS_COMPRESSION



Commit 3cf0f824 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: 3cf0f824 ("BACKPORT: f2fs: compress: remove unneeded preallocation")
Change-Id: I40015a66b8b872c86ff782b30581b24f752bb19a
Signed-off-by: default avatarVaisakh Murali <vaisakhmurali@gmail.com>
parent 9f71ba69
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));
	}