Skip to contentSkip to conversation

fs/ntfs3: fix build without CONFIG_NTFS3_LZX_XPRESS

PATCH Superseded Mark O'Donovan 3 participants 4 messages Feb 14, 2024 – Feb 21, 2024 NTFS3 filesystem

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/ntfs3: fix build without CONFIG_NTFS3_LZX_XPRESS

When CONFIG_NTFS3_LZX_XPRESS is not set then we get the following:
fs/ntfs3/frecord.c:2460:16: error: unused variable ‘i_size’

---
 fs/ntfs3/frecord.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/frecord.c +1 -1
index 3b42938a9d3b..7f27382e0ce2 100644
@@ -2457,7 +2457,6 @@ 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;
-	loff_t i_size = i_size_read(&ni->vfs_inode);
 	u64 vbo_disk;
 	size_t unc_size;
 	u32 frame_size, i, npages_disk, ondisk_size;
@@ -2509,6 +2508,7 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
 		err = -EOPNOTSUPP;
 		goto out1;
 #else
+		loff_t i_size = i_size_read(&ni->vfs_inode);
 		u32 frame_bits = ni_ext_compress_bits(ni);
 		u64 frame64 = frame_vbo >> frame_bits;
 		u64 frames, vbo_data;

base-commit: 7e90b5c295ec1e47c8ad865429f046970c549a66

Signature · 1 line
2.39.2
Tested-by on v1 1/1
#1 lore raw

Hi.

Quoted 29 lines · Mark O'Donovan

When CONFIG_NTFS3_LZX_XPRESS is not set then we get the following:
fs/ntfs3/frecord.c:2460:16: error: unused variable ‘i_size’

---
 fs/ntfs3/frecord.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/frecord.c +1 -1
index 3b42938a9d3b..7f27382e0ce2 100644
@@ -2457,7 +2457,6 @@ 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;
-	loff_t i_size = i_size_read(&ni->vfs_inode);
 	u64 vbo_disk;
 	size_t unc_size;
 	u32 frame_size, i, npages_disk, ondisk_size;
@@ -2509,6 +2508,7 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
 		err = -EOPNOTSUPP;
 		goto out1;
 #else
+		loff_t i_size = i_size_read(&ni->vfs_inode);
 		u32 frame_bits = ni_ext_compress_bits(ni);
 		u64 frame64 = frame_vbo >> frame_bits;
 		u64 frames, vbo_data;
Quoted 1 line

base-commit: 7e90b5c295ec1e47c8ad865429f046970c549a66

Mark - Thanks for the patch.
Alex - Fixes a build bug introduced by 4fd6c08a16d7f1ba10212c9ef7bc73218144b463.

#2 lore raw

Hi

This build regression also shows up, along with other problems, in a report to the ntfs3 list by the kernel test robot.[1]

Also, as this patch seems not to have been picked up by the NTFS3 maintainer I've added Thorsten Leemhuis so he can consider adding this egression to the tracker.

[1] https://lore.kernel.org/ntfs3/[email protected]/T/#u

Chris

Quoted 38 lines · Chris Clayton

Hi.

Quoted 29 lines · Mark O'Donovan

When CONFIG_NTFS3_LZX_XPRESS is not set then we get the following:
fs/ntfs3/frecord.c:2460:16: error: unused variable ‘i_size’

---
 fs/ntfs3/frecord.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/frecord.c +1 -1
index 3b42938a9d3b..7f27382e0ce2 100644
@@ -2457,7 +2457,6 @@ 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;
-	loff_t i_size = i_size_read(&ni->vfs_inode);
 	u64 vbo_disk;
 	size_t unc_size;
 	u32 frame_size, i, npages_disk, ondisk_size;
@@ -2509,6 +2508,7 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
 		err = -EOPNOTSUPP;
 		goto out1;
 #else
+		loff_t i_size = i_size_read(&ni->vfs_inode);
 		u32 frame_bits = ni_ext_compress_bits(ni);
 		u64 frame64 = frame_vbo >> frame_bits;
 		u64 frames, vbo_data;
Quoted 1 line

base-commit: 7e90b5c295ec1e47c8ad865429f046970c549a66

Mark - Thanks for the patch.
Alex - Fixes a build bug introduced by 4fd6c08a16d7f1ba10212c9ef7bc73218144b463.

#3 lore raw
Quoted 7 lines · Chris Clayton

This build regression also shows up, along with other problems, in a report to the ntfs3 list by the kernel test robot.[1]

Also, as this patch seems not to have been picked up by the NTFS3 maintainer I've added Thorsten Leemhuis so he can consider adding this egression to the tracker.

You mistyped my email address, but I noticed this by chance. :-D

Mark, could you do me a favor and send a v2 that picked up the Tested-by and includes a Fixes: tag for the commit causing it? Then in case Konstantin doesn't pick this up any time soon I'll ask Linus to pick this up straight from the list.

Ciao, Thorsten

Quoted 42 lines

[1]
https://lore.kernel.org/ntfs3/[email protected]/T/#u>
Chris>

Quoted 38 lines · Chris Clayton

Hi.

Quoted 29 lines · Mark O'Donovan

When CONFIG_NTFS3_LZX_XPRESS is not set then we get the following:
fs/ntfs3/frecord.c:2460:16: error: unused variable ‘i_size’

---
 fs/ntfs3/frecord.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/frecord.c +1 -1
index 3b42938a9d3b..7f27382e0ce2 100644
@@ -2457,7 +2457,6 @@ 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;
-	loff_t i_size = i_size_read(&ni->vfs_inode);
 	u64 vbo_disk;
 	size_t unc_size;
 	u32 frame_size, i, npages_disk, ondisk_size;
@@ -2509,6 +2508,7 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
 		err = -EOPNOTSUPP;
 		goto out1;
 #else
+		loff_t i_size = i_size_read(&ni->vfs_inode);
 		u32 frame_bits = ni_ext_compress_bits(ni);
 		u64 frame64 = frame_vbo >> frame_bits;
 		u64 frames, vbo_data;
Quoted 1 line

base-commit: 7e90b5c295ec1e47c8ad865429f046970c549a66

Mark - Thanks for the patch.
Alex - Fixes a build bug introduced by 4fd6c08a16d7f1ba10212c9ef7bc73218144b463.