[PATCH] smb: common: add header guards to fs/smb/common/smb2status.h
Stefan Metzmacher
metze at samba.org
Wed Feb 4 16:17:39 UTC 2026
Am 04.02.26 um 17:09 schrieb Stefan Metzmacher:
> Am 03.02.26 um 16:34 schrieb Stefan Metzmacher:
>> Hi Steve,
>>
>> this is on top of your for-next branch as it depends on this
>> patch from David:
>>
>> cifs: Label SMB2 statuses with errors
>>
>> While there I found that this patch:
>> cifs: Autogenerate SMB2 error mapping table
>>
>> Generates this error:
>> client/smb2maperror.c:55:60: SPARSE: error: restricted __le32 degrades to integer
>> David can you check?
This seems to be fixes by
smb/client: use bsearch() to find target in smb2_error_map_table
as I'm no longer see it when compiling all of for-next.
> This also breaks cifs.ko against a running kernel.
>
> $(obj)/smb2_mapping_table.c: $(srctree)/fs/smb/common/smb2status.h
>
> results in:
>
> make[3]: *** No rule to make target '/usr/src/linux-headers-6.19.0-rc8-z-metze-perf.01+/fs/smb/common/smb2status.h', needed by 'smb2_mapping_table.c'. Stop.
> make[3]: *** Waiting for unfinished jobs....
> CC [M] smb2ops.o
> make[2]: *** [/usr/src/linux-headers-6.19.0-rc8-z-metze-perf.01+/Makefile:2061: .] Error 2
> make[1]: *** [/usr/src/linux-headers-6.19.0-rc8-z-metze-perf.01+/Makefile:249: __sub-make] Error 2
> make[1]: Leaving directory '/root/cifs-backport/fs-smb/client'
> make: *** [Makefile:249: __sub-make] Error 2
> make: Leaving directory '/usr/src/linux-headers-6.19.0-rc8-z-metze-perf.01+'
This fixes it for me:
diff --git a/fs/smb/client/Makefile b/fs/smb/client/Makefile
index 802dec276e15..3abd357d6df6 100644
--- a/fs/smb/client/Makefile
+++ b/fs/smb/client/Makefile
@@ -47,7 +47,7 @@ cifs-$(CONFIG_CIFS_COMPRESSION) += compress.o compress/lz77.o
#
# Build the SMB2 error mapping table from smb2status.h
#
-$(obj)/smb2_mapping_table.c: $(srctree)/fs/smb/common/smb2status.h \
+$(obj)/smb2_mapping_table.c: $(src)/../common/smb2status.h \
$(src)/gen_smb2_mapping
$(call cmd,gen_smb2_mapping)
metze
More information about the samba-technical
mailing list