fs/ntfs3/frecord: don't define i_size if NTFS3_LZX_XPRESS is disabled

Message ID 20240212114341.1736547-1-max.kellermann@ionos.com
State New
Headers
Series fs/ntfs3/frecord: don't define i_size if NTFS3_LZX_XPRESS is disabled |

Commit Message

Max Kellermann Feb. 12, 2024, 11:43 a.m. UTC
  Fixes compiler warning:

 fs/ntfs3/frecord.c: In function 'ni_read_frame':
 fs/ntfs3/frecord.c:2460:16: error: unused variable 'i_size' [-Werror=unused-variable]
  2460 |         loff_t i_size = i_size_read(&ni->vfs_inode);
       |                ^~~~~~

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
 fs/ntfs3/frecord.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index 3b42938a9d3b..5cac06d27bf1 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -2457,7 +2457,9 @@  int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
 	struct ATTR_LIST_ENTRY *le = NULL;
 	struct runs_tree *run = &ni->file.run;
 	u64 valid_size = ni->i_valid;
+#ifdef CONFIG_NTFS3_LZX_XPRESS
 	loff_t i_size = i_size_read(&ni->vfs_inode);
+#endif
 	u64 vbo_disk;
 	size_t unc_size;
 	u32 frame_size, i, npages_disk, ondisk_size;