# git rev-parse -q --verify b08968f196d498b19e9d0841d76a03862258f2d8^{commit} b08968f196d498b19e9d0841d76a03862258f2d8 already have revision, skipping fetch # git checkout -q -f -B kisskb b08968f196d498b19e9d0841d76a03862258f2d8 # git clean -qxdf # < git log -1 # commit b08968f196d498b19e9d0841d76a03862258f2d8 # Author: David Howells # Date: Thu Mar 3 13:05:18 2022 +0000 # # cachefiles: Fix incorrect length to fallocate() # # When cachefiles_shorten_object() calls fallocate() to shape the cache # file to match the DIO size, it passes the total file size it wants to # achieve, not the amount of zeros that should be inserted. Since this is # meant to preallocate that amount of storage for the file, it can cause # the cache to fill up the disk and hit ENOSPC. # # Fix this by passing the length actually required to go from the current # EOF to the desired EOF. # # Fixes: 7623ed6772de ("cachefiles: Implement cookie resize for truncate") # Reported-by: Jeffle Xu # Signed-off-by: David Howells # Tested-by: Jeff Layton # Reviewed-by: Jeff Layton # cc: linux-cachefs@redhat.com # Link: https://lore.kernel.org/r/164630854858.3665356.17419701804248490708.stgit@warthog.procyon.org.uk # v1 # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 b08968f196d498b19e9d0841d76a03862258f2d8 # < make -s -j 8 ARCH=um O=/kisskb/build/linus_um-allyesconfig_um-x86_64 CROSS_COMPILE=/opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux- SUBARCH=x86_64 allyesconfig # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_KCOV=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_GCC_PLUGIN_CYC_COMPLEXITY=n # Added to kconfig CONFIG_GCC_PLUGIN_SANCOV=n # Added to kconfig CONFIG_GCC_PLUGIN_LATENT_ENTROPY=n # Added to kconfig CONFIG_GCC_PLUGIN_STRUCTLEAK=n # Added to kconfig CONFIG_GCC_PLUGIN_RANDSTRUCT=n # Added to kconfig CONFIG_UML_NET=n # Added to kconfig CONFIG_UML_NET_ETHERTAP=n # Added to kconfig CONFIG_UML_NET_TUNTAP=n # Added to kconfig CONFIG_UML_NET_SLIP=n # Added to kconfig CONFIG_UML_NET_DAEMON=n # Added to kconfig CONFIG_UML_NET_VDE=n # Added to kconfig CONFIG_UML_NET_MCAST=n # Added to kconfig CONFIG_UML_NET_PCAP=n # Added to kconfig CONFIG_UML_NET_SLIRP=n # Added to kconfig CONFIG_GCOV_KERNEL=n # Added to kconfig CONFIG_DEBUG_INFO_BTF=n # Added to kconfig CONFIG_BPF_PRELOAD=n # < make -s -j 8 ARCH=um O=/kisskb/build/linus_um-allyesconfig_um-x86_64 CROSS_COMPILE=/opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux- SUBARCH=x86_64 help # make -s -j 8 ARCH=um O=/kisskb/build/linus_um-allyesconfig_um-x86_64 CROSS_COMPILE=/opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux- SUBARCH=x86_64 olddefconfig .config:12232:warning: override: reassigning to symbol GCC_PLUGIN_SANCOV .config:12235:warning: override: reassigning to symbol GCC_PLUGIN_RANDSTRUCT .config:12237:warning: override: reassigning to symbol UML_NET_ETHERTAP .config:12239:warning: override: reassigning to symbol UML_NET_SLIP .config:12242:warning: override: reassigning to symbol UML_NET_MCAST .config:12244:warning: override: reassigning to symbol UML_NET_SLIRP # make -s -j 8 ARCH=um O=/kisskb/build/linus_um-allyesconfig_um-x86_64 CROSS_COMPILE=/opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux- SUBARCH=x86_64 In file included from /kisskb/src/arch/x86/um/asm/processor.h:41:0, from /kisskb/src/include/linux/mutex.h:19, from /kisskb/src/include/linux/kernfs.h:11, from /kisskb/src/include/linux/sysfs.h:16, from /kisskb/src/include/linux/kobject.h:20, from /kisskb/src/include/linux/pci.h:35, from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:25: /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In function 'kfd_cpumask_to_apic_id': /kisskb/src/arch/um/include/asm/processor-generic.h:103:18: error: called object is not a function or function pointer #define cpu_data (&boot_cpu_data) ^ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1556:9: note: in expansion of macro 'cpu_data' return cpu_data(first_cpu_of_numa_node).apicid; ^ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1560:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1: all warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:288: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.o] Error 1 make[4]: *** [/kisskb/src/scripts/Makefile.build:550: drivers/gpu/drm/amd/amdgpu] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/kisskb/src/scripts/Makefile.build:550: drivers/gpu/drm] Error 2 make[2]: *** [/kisskb/src/scripts/Makefile.build:550: drivers/gpu] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/kisskb/src/Makefile:1831: drivers] Error 2 make: *** [Makefile:219: __sub-make] Error 2 Command 'make -s -j 8 ARCH=um O=/kisskb/build/linus_um-allyesconfig_um-x86_64 CROSS_COMPILE=/opt/cross/kisskb/fe-x86-64-core-i7-2017.05/bin/x86_64-linux- SUBARCH=x86_64 ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus_um-allyesconfig_um-x86_64 # Build took: 0:17:43.736554