Linux 5.15.169
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.169 kernel.
All users of the 5.15 kernel series must upgrade.
The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm64/kernel/probes/decode-insn.c | 16 arch/arm64/kernel/probes/simulate-insn.c | 18 arch/powerpc/mm/numa.c | 6 arch/s390/kvm/diag.c | 2 arch/x86/entry/entry.S | 5 arch/x86/entry/entry_32.S | 6 arch/x86/include/asm/cpufeatures.h | 4 arch/x86/kernel/apic/apic.c | 14 arch/x86/kernel/cpu/bugs.c | 32 arch/x86/kernel/cpu/common.c | 3 arch/x86/kernel/cpu/resctrl/core.c | 4 block/blk-rq-qos.c | 2 drivers/bluetooth/btusb.c | 13 drivers/gpu/drm/drm_gem_shmem_helper.c | 3 drivers/gpu/drm/radeon/radeon_encoders.c | 2 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 1 drivers/iio/adc/Kconfig | 4 drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 2 drivers/iio/dac/Kconfig | 3 drivers/iio/light/opt3001.c | 4 drivers/iio/light/veml6030.c | 5 drivers/iio/proximity/Kconfig | 2 drivers/iommu/intel/iommu.c | 4 drivers/irqchip/irq-gic-v3-its.c | 26 drivers/md/dm-crypt.c | 37 drivers/net/ethernet/cadence/macb_main.c | 14 drivers/net/ethernet/freescale/enetc/enetc.c | 2 drivers/parport/procfs.c | 22 drivers/pinctrl/pinctrl-ocelot.c | 8 drivers/s390/char/sclp_vt220.c | 4 drivers/usb/host/xhci-ring.c | 2 drivers/usb/host/xhci.h | 2 drivers/usb/serial/option.c | 8 fs/fat/namei_vfat.c | 2 fs/nilfs2/dir.c | 50 fs/nilfs2/namei.c | 39 fs/nilfs2/nilfs.h | 2 fs/udf/dir.c | 148 -- fs/udf/directory.c | 564 +++++++--- fs/udf/inode.c | 90 - fs/udf/namei.c | 1050 ++++++-------------- fs/udf/udfdecl.h | 45 include/linux/fsl/enetc_mdio.h | 3 include/linux/irqchip/arm-gic-v4.h | 4 io_uring/io_uring.c | 21 kernel/time/posix-clock.c | 3 mm/secretmem.c | 4 mm/swapfile.c | 2 net/bluetooth/af_bluetooth.c | 1 net/ipv4/tcp_output.c | 2 net/mac80211/cfg.c | 3 net/mac80211/key.c | 2 net/mptcp/mib.c | 3 net/mptcp/mib.h | 3 net/mptcp/pm_netlink.c | 3 net/mptcp/protocol.c | 23 net/mptcp/protocol.h | 2 net/mptcp/subflow.c | 19 sound/pci/hda/patch_conexant.c | 19 virt/kvm/kvm_main.c | 5 61 files changed, 1162 insertions(+), 1232 deletions(-)
Aaron Thompson (1):
Bluetooth: Remove debugfs directory on module init failure
Aneesh Kumar K.V (1):
powerpc/mm: Always update max/min_low_pfn in mem_topology_setup()
Benjamin B. Frost (1):
USB: serial: option: add support for Quectel EG916Q-GL
Breno Leitao (1):
KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin()
Christophe JAILLET (1):
iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency()
Daniele Palmas (1):
USB: serial: option: add Telit FN920C04 MBIM compositions
Emil Gedenryd (1):
iio: light: opt3001: add missing full-scale range value
Felix Moessbauer (2):
io_uring/sqpoll: do not allow pinning outside of cpuset io_uring/sqpoll: do not put cpumask on stack
Geliang Tang (1):
mptcp: track and update contiguous data status
Greg Kroah-Hartman (1):
Linux 5.15.169
Jan Kara (20):
udf: New directory iteration code
udf: Convert udf_expand_dir_adinicb() to new directory iteration
udf: Move udf_expand_dir_adinicb() to its callsite
udf: Implement searching for directory entry using new iteration code
udf: Provide function to mark entry as deleted using new directory iteration code
udf: Convert udf_rename() to new directory iteration code
udf: Convert udf_readdir() to new directory iteration
udf: Convert udf_lookup() to use new directory iteration code
udf: Convert udf_get_parent() to new directory iteration code
udf: Convert empty_dir() to new directory iteration code
udf: Convert udf_rmdir() to new directory iteration code
udf: Convert udf_unlink() to new directory iteration code
udf: Implement adding of dir entries using new iteration code
udf: Convert udf_add_nondir() to new directory iteration
udf: Convert udf_mkdir() to new directory iteration code
udf: Convert udf_link() to new directory iteration code
udf: Remove old directory iteration code
udf: Handle error when expanding directory
udf: Don't return bh from udf_expand_dir_adinicb()
udf: Fix bogus checksum computation in udf_rename()
Javier Carrasco (8):
iio: dac: ad5770r: add missing select REGMAP_SPI in Kconfig
iio: dac: ltc1660: add missing select REGMAP_SPI in Kconfig
iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig
iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
iio: light: veml6030: fix ALS sensor resolution
iio: light: veml6030: fix IIO device retrieval from embedded device
iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
iio: adc: ti-ads124s08: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Jens Axboe (2):
io_uring/sqpoll: retain test for whether the CPU is valid io_uring/sqpoll: close race on waiting for sqring entries
Jim Mattson (1):
x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET
Jinjie Ruan (1):
posix-clock: Fix missing timespec64 check in pc_clock_settime()
Johannes Berg (1):
wifi: mac80211: fix potential key use-after-free
Johannes Wikner (4):
x86/cpufeatures: Add a IBPB_NO_RET BUG flag x86/entry: Have entry_ibpb() invalidate return predictions x86/bugs: Skip RSB fill at VMEXIT
x86/bugs: Do not use UNTRAIN_RET with IBPB on entry
Liu Shixin (1):
mm/swapfile: skip HugeTLB pages for unuse_vma
Lu Baolu (1):
iommu/vt-d: Fix incorrect pci_for_each_dma_alias() for non-PCI devices
Luiz Augusto von Dentz (1):
Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001
Marc Zyngier (1):
irqchip/gic-v4: Don't allow a VMOVP on a dying VPE
Mark Rutland (2):
arm64: probes: Remove broken LDR (literal) uprobe support
arm64: probes: Fix simulate_ldr*_literal()
Mathias Nyman (2):
xhci: Fix incorrect stream context type macro
xhci: Mitigate failed set dequeue pointer commands
Matthieu Baerts (NGI0) (2):
mptcp: fallback when MPTCP opts are dropped after 1st data
mptcp: pm: fix UaF read in mptcp_pm_nl_rm_addr_or_subflow
Michael Mueller (1):
KVM: s390: Change virtual to physical address access in diag 0x258 handler
Mikulas Patocka (1):
dm-crypt, dm-verity: disable tasklets
Nathan Chancellor (1):
x86/resctrl: Annotate get_mem_config() functions as __init
Nianyao Tang (1):
irqchip/gic-v3-its: Fix VSYNC referencing an unmapped VPE on GIC v4.1
Nikolay Kuratov (1):
drm/vmwgfx: Handle surface check failure correctly
OGAWA Hirofumi (1):
fat: fix uninitialized variable
Oleksij Rempel (1):
net: macb: Avoid 20s boot delay by skipping MDIO bus registration for fixed-link PHY
Omar Sandoval (1):
blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race
Paolo Abeni (3):
mptcp: handle consistently DSS corruption
tcp: fix mptcp DSS corruption due to large pmtu xmit
mptcp: prevent MPC handshake on port-based signal endpoints
Patrick Roy (1):
secretmem: disable memfd_secret() if arch cannot set direct map
Pawan Gupta (2):
x86/entry_32: Do not clobber user EFLAGS.ZF x86/entry_32: Clear CPU buffers after register restore in NMI return
Ryusuke Konishi (1):
nilfs2: propagate directory read errors from nilfs_find_entry()
Sergey Matsievskiy (1):
pinctrl: ocelot: fix system hang on level based interrupts
Takashi Iwai (1):
parport: Proper fix for array out-of-bounds access
Thomas Weißschuh (1):
s390/sclp_vt220: Convert newlines to CRLF instead of LFCR
Vasiliy Kovalev (2):
ALSA: hda/conexant - Fix audio routing for HP EliteOne 1000 G2
ALSA: hda/conexant - Use cached pin control for Node 0x1d on HP EliteOne 1000 G2
Ville Syrjälä (1):
drm/radeon: Fix encoder->possible_clones
Wachowski, Karol (1):
drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)
Wei Fang (2):
net: enetc: remove xdp_drops statistic from enetc_xdp_drop()
net: enetc: add missing static descriptor and inline keyword
Zhang Rui (1):
x86/apic: Always explicitly disarm TSC-deadline timer
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 168 +SUBLEVEL = 169 EXTRAVERSION = NAME = Trick or Treat
arch/arm64/kernel/probes/decode-insn.c +11 -5
@@ -99,10 +99,6 @@ arm_probe_decode_insn(probe_opcode_t insn, struct arch_probe_insn *api) aarch64_insn_is_blr(insn) || aarch64_insn_is_ret(insn)) { api->handler = simulate_br_blr_ret; - } else if (aarch64_insn_is_ldr_lit(insn)) { - api->handler = simulate_ldr_literal; - } else if (aarch64_insn_is_ldrsw_lit(insn)) { - api->handler = simulate_ldrsw_literal; } else {/* * Instruction cannot be stepped out-of-line and we don't
@@ -140,6 +136,17 @@ arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi)probe_opcode_t insn =le32_to_cpu (*addr);probe_opcode_t *scan_end =NULL ;unsigned long size =0 , offset =0 ; +struct arch_probe_insn *api = &asi->api; + +if (aarch64_insn_is_ldr_lit (insn)) { + api->handler = simulate_ldr_literal; + decoded =INSN_GOOD_NO_SLOT ; + }else if (aarch64_insn_is_ldrsw_lit (insn)) { + api->handler = simulate_ldrsw_literal; + decoded =INSN_GOOD_NO_SLOT ; + }else { + decoded =arm_probe_decode_insn (insn, &asi->api); + }/* * If there's a symbol defined in front of and near enough to
@@ -157,7 +164,6 @@ arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi)else scan_end = addr -MAX_ATOMIC_CONTEXT_SIZE ; } - decoded =arm_probe_decode_insn (insn, &asi->api);if (decoded !=INSN_REJECTED && scan_end)if (is_probed_address_atomic (addr -1 , scan_end))
arch/arm64/kernel/probes/simulate-insn.c +7 -11
@@ -171,17 +171,15 @@ simulate_tbz_tbnz(u32 opcode, long addr, struct pt_regs *regs)void __kprobes simulate_ldr_literal (u32 opcode,long addr,struct pt_regs *regs) { -u64 *load_addr; +unsigned long load_addr;int xn = opcode &0x1f ; -int disp; - disp =ldr_displacement (opcode); - load_addr = (u64 *) (addr + disp); + load_addr = addr +ldr_displacement (opcode);if (opcode & (1 <<30 ))/* x0-x30 */ -set_x_reg (regs, xn, *load_addr); +set_x_reg (regs, xn,READ_ONCE (*(u64 *)load_addr));else /* w0-w30 */ -set_w_reg (regs, xn, *load_addr); +set_w_reg (regs, xn,READ_ONCE (*(u32 *)load_addr));instruction_pointer_set (regs,instruction_pointer (regs) +4 ); }
@@ -189,14 +187,12 @@ simulate_ldr_literal(u32 opcode, long addr, struct pt_regs *regs)void __kprobes simulate_ldrsw_literal (u32 opcode,long addr,struct pt_regs *regs) { -s32 *load_addr; +unsigned long load_addr;int xn = opcode &0x1f ; -int disp; - disp =ldr_displacement (opcode); - load_addr = (s32 *) (addr + disp); + load_addr = addr +ldr_displacement (opcode); -set_x_reg (regs, xn, *load_addr); +set_x_reg (regs, xn,READ_ONCE (*(s32 *)load_addr));instruction_pointer_set (regs,instruction_pointer (regs) +4 ); }
arch/powerpc/mm/numa.c +3 -3
@@ -1162,6 +1162,9 @@ void __init mem_topology_setup(void) {int cpu; + max_low_pfn = max_pfn =memblock_end_of_DRAM () >>PAGE_SHIFT ; + min_low_pfn =MEMORY_START >>PAGE_SHIFT ; +/* * Linux/mm assumes node 0 to be online at boot. However this is not * true on PowerPC, where node 0 is similar to any other node, it
@@ -1206,9 +1209,6 @@ void __init initmem_init(void) {int nid; - max_low_pfn =memblock_end_of_DRAM () >>PAGE_SHIFT ; - max_pfn = max_low_pfn; -memblock_dump_all ();for_each_online_node (nid) {
arch/s390/kvm/diag.c +1 -1
@@ -77,7 +77,7 @@ static int __diag_page_ref_service(struct kvm_vcpu *vcpu) vcpu->stat.instruction_diagnose_258++;if (vcpu->run->s.regs.gprs[rx] &7 )return kvm_s390_inject_program_int (vcpu,PGM_SPECIFICATION ); - rc =read_guest (vcpu, vcpu->run->s.regs.gprs[rx], rx, &parm,sizeof (parm)); + rc =read_guest_real (vcpu, vcpu->run->s.regs.gprs[rx], &parm,sizeof (parm));if (rc)return kvm_s390_inject_prog_cond (vcpu, rc);if (parm.parm_version !=2 || parm.parm_len <5 || parm.code !=0x258 )
arch/x86/entry/entry.S +5 -0
@@ -9,6 +9,8 @@ #include <asm/unwind_hints.h> #include <asm/segment.h> #include <asm/cache.h> +#include <asm/cpufeatures.h> +#include <asm/nospec-branch.h> .pushsection .noinstr.text, "ax"
@@ -17,6 +19,9 @@ SYM_FUNC_START(entry_ibpb) movl $PRED_CMD_IBPB, %eax xorl %edx, %edx wrmsr + + /* Make sure IBPB clears return stack preductions too. */ + FILL_RETURN_BUFFER %rax, RSB_CLEAR_LOOPS, X86_BUG_IBPB_NO_RET RET SYM_FUNC_END(entry_ibpb) /* For KVM */
arch/x86/entry/entry_32.S +4 -2
@@ -902,6 +902,8 @@ SYM_FUNC_START(entry_SYSENTER_32) /* Now ready to switch the cr3 */ SWITCH_TO_USER_CR3 scratch_reg=%eax + /* Clobbers ZF */ + CLEAR_CPU_BUFFERS /* * Restore all flags except IF. (We restore IF separately because
@@ -912,7 +914,6 @@ SYM_FUNC_START(entry_SYSENTER_32) BUG_IF_WRONG_CR3 no_user_check=1 popfl popl %eax - CLEAR_CPU_BUFFERS /* * Return back to the vDSO, which will pop ecx and edx.
@@ -1175,7 +1176,6 @@ SYM_CODE_START(asm_exc_nmi) /* Not on SYSENTER stack. */ call exc_nmi - CLEAR_CPU_BUFFERS jmp .Lnmi_return .Lnmi_from_sysenter_stack:
@@ -1196,6 +1196,7 @@ SYM_CODE_START(asm_exc_nmi) CHECK_AND_APPLY_ESPFIX RESTORE_ALL_NMI cr3_reg=%edi pop=4 + CLEAR_CPU_BUFFERS jmp .Lirq_return #ifdef CONFIG_X86_ESPFIX32
@@ -1237,6 +1238,7 @@ SYM_CODE_START(asm_exc_nmi) * 1 - orig_ax */ lss (1+5+6)*4(%esp), %esp # back to espfix stack + CLEAR_CPU_BUFFERS jmp .Lirq_return #endif SYM_CODE_END(asm_exc_nmi)
arch/x86/include/asm/cpufeatures.h +3 -1
@@ -217,7 +217,7 @@#define X86_FEATURE_SPEC_STORE_BYPASS_DISABLE ( 7*32+23)/* "" Disable Speculative Store Bypass. */ #define X86_FEATURE_LS_CFG_SSBD ( 7*32+24)/* "" AMD SSBD implementation via LS_CFG MSR */ #define X86_FEATURE_IBRS ( 7*32+25)/* Indirect Branch Restricted Speculation */ -#define X86_FEATURE_IBPB ( 7*32+26)/* Indirect Branch Prediction Barrier */ +#define X86_FEATURE_IBPB ( 7*32+26)/* "ibpb" Indirect Branch Prediction Barrier without a guaranteed RSB flush */ #define X86_FEATURE_STIBP ( 7*32+27)/* Single Thread Indirect Branch Predictors */ #define X86_FEATURE_ZEN ( 7*32+28)/* "" CPU is AMD family 0x17 or above (Zen) */ #define X86_FEATURE_L1TF_PTEINV ( 7*32+29)/* "" L1TF workaround PTE inversion */
@@ -329,6 +329,7 @@#define X86_FEATURE_VIRT_SSBD (13*32+25)/* Virtualized Speculative Store Bypass Disable */ #define X86_FEATURE_AMD_SSB_NO (13*32+26)/* "" Speculative Store Bypass is fixed in hardware. */ #define X86_FEATURE_BTC_NO (13*32+29)/* "" Not vulnerable to Branch Type Confusion */ +#define X86_FEATURE_AMD_IBPB_RET (13*32+30)/* "" IBPB clears return address predictor */ /* Thermal and Power Management Leaf, CPUID level 0x00000006 (EAX), word 14 */ #define X86_FEATURE_DTHERM (14*32+ 0)/* Digital Thermal Sensor */
@@ -480,4 +481,5 @@#define X86_BUG_DIV0 X86_BUG(1*32 + 1)/* AMD DIV0 speculation bug */ #define X86_BUG_RFDS X86_BUG(1*32 + 2)/* CPU is vulnerable to Register File Data Sampling */ #define X86_BUG_BHI X86_BUG(1*32 + 3)/* CPU is affected by Branch History Injection */ +#define X86_BUG_IBPB_NO_RET X86_BUG(1*32 + 4)/* "ibpb_no_ret" IBPB omits return target predictions */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/kernel/apic/apic.c +13 -1
@@ -493,7 +493,19 @@ static int lapic_timer_shutdown(struct clock_event_device *evt) v =apic_read (APIC_LVTT ); v |= (APIC_LVT_MASKED |LOCAL_TIMER_VECTOR );apic_write (APIC_LVTT , v); -apic_write (APIC_TMICT ,0 ); + +/* +* Setting APIC_LVT_MASKED (above) should be enough to tell +* the hardware that this timer will never fire. But AMD +* erratum 411 and some Intel CPU behavior circa 2024 say +* otherwise. Time for belt and suspenders programming: mask +* the timer _and_ zero the counter registers: +*/ +if (v &APIC_LVT_TIMER_TSCDEADLINE ) +wrmsrl (MSR_IA32_TSC_DEADLINE ,0 ); +else +apic_write (APIC_TMICT ,0 ); +return 0 ; }
arch/x86/kernel/cpu/bugs.c +32 -0
@@ -1092,7 +1092,24 @@ static void __init retbleed_select_mitigation(void)case RETBLEED_MITIGATION_IBPB :setup_force_cpu_cap (X86_FEATURE_ENTRY_IBPB ); + +/* +* IBPB on entry already obviates the need for +* software-based untraining so clear those in case some +* other mitigation like SRSO has selected them. +*/ +setup_clear_cpu_cap (X86_FEATURE_UNRET ); +setup_clear_cpu_cap (X86_FEATURE_RETHUNK ); + mitigate_smt = true; + +/* +* There is no need for RSB filling: entry_ibpb() ensures +* all predictions, including the RSB, are invalidated, +* regardless of IBPB implementation. +*/ +setup_clear_cpu_cap (X86_FEATURE_RSB_VMEXIT ); +break ;default :
@@ -2591,6 +2608,14 @@ static void __init srso_select_mitigation(void)if (has_microcode) {setup_force_cpu_cap (X86_FEATURE_ENTRY_IBPB ); srso_mitigation =SRSO_MITIGATION_IBPB ; + +/* +* IBPB on entry already obviates the need for +* software-based untraining so clear those in case some +* other mitigation like Retbleed has selected them. +*/ +setup_clear_cpu_cap (X86_FEATURE_UNRET ); +setup_clear_cpu_cap (X86_FEATURE_RETHUNK ); } }else {pr_err ("WARNING: kernel not compiled with CPU_IBPB_ENTRY.\n" );
@@ -2603,6 +2628,13 @@ static void __init srso_select_mitigation(void)if (!boot_cpu_has (X86_FEATURE_ENTRY_IBPB ) && has_microcode) {setup_force_cpu_cap (X86_FEATURE_IBPB_ON_VMEXIT ); srso_mitigation =SRSO_MITIGATION_IBPB_ON_VMEXIT ; + +/* +* There is no need for RSB filling: entry_ibpb() ensures +* all predictions, including the RSB, are invalidated, +* regardless of IBPB implementation. +*/ +setup_clear_cpu_cap (X86_FEATURE_RSB_VMEXIT ); } }else {pr_err ("WARNING: kernel not compiled with CPU_SRSO.\n" );
arch/x86/kernel/cpu/common.c +3 -0
@@ -1352,6 +1352,9 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c) boot_cpu_has(X86_FEATURE_HYPERVISOR)))setup_force_cpu_bug (X86_BUG_BHI ); +if (cpu_has (c,X86_FEATURE_AMD_IBPB ) && !cpu_has (c,X86_FEATURE_AMD_IBPB_RET )) +setup_force_cpu_bug (X86_BUG_IBPB_NO_RET ); +if (cpu_matches (cpu_vuln_whitelist,NO_MELTDOWN ))return ;
arch/x86/kernel/cpu/resctrl/core.c +2 -2
@@ -175,7 +175,7 @@ static inline bool rdt_get_mb_table(struct rdt_resource *r)return false; } -static bool __get_mem_config_intel (struct rdt_resource *r) +static __init bool __get_mem_config_intel (struct rdt_resource *r) {struct rdt_hw_resource *hw_res =resctrl_to_arch_res (r);union cpuid_0x10_3_eax eax;
@@ -210,7 +210,7 @@ static bool __get_mem_config_intel(struct rdt_resource *r)return true; } -static bool __rdt_get_mem_config_amd (struct rdt_resource *r) +static __init bool __rdt_get_mem_config_amd (struct rdt_resource *r) {struct rdt_hw_resource *hw_res =resctrl_to_arch_res (r);union cpuid_0x10_3_eax eax;
block/blk-rq-qos.c +1 -1
@@ -225,8 +225,8 @@ static int rq_qos_wake_function(struct wait_queue_entry *curr, data->got_token = true;smp_wmb (); -list_del_init (&curr->entry);wake_up_process (data->task); +list_del_init_careful (&curr->entry);return 1 ; }
drivers/bluetooth/btusb.c +9 -4
@@ -1002,10 +1002,15 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags)if (!urb)return -ENOMEM ; -/* Use maximum HCI Event size so the USB stack handles -* ZPL/short-transfer automatically. -*/ - size =HCI_MAX_EVENT_SIZE ; +if (le16_to_cpu (data->udev->descriptor.idVendor) ==0x0a12 && +le16_to_cpu (data->udev->descriptor.idProduct) ==0x0001 ) +/* Fake CSR devices don't seem to support sort-transter */ + size =le16_to_cpu (data->intr_ep->wMaxPacketSize); +else +/* Use maximum HCI Event size so the USB stack handles +* ZPL/short-transfer automatically. +*/ + size =HCI_MAX_EVENT_SIZE ; buf =kmalloc (size, mem_flags);if (!buf) {
drivers/gpu/drm/drm_gem_shmem_helper.c +3 -0
@@ -607,6 +607,9 @@ int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct vm_area_structreturn ret; } +if (is_cow_mapping (vma->vm_flags)) +return -EINVAL ; + ret =drm_gem_shmem_get_pages (shmem);if (ret)return ret;
drivers/gpu/drm/radeon/radeon_encoders.c +1 -1
@@ -41,7 +41,7 @@ static uint32_t radeon_encoder_clones(struct drm_encoder *encoder)struct radeon_device *rdev = dev->dev_private;struct radeon_encoder *radeon_encoder =to_radeon_encoder (encoder);struct drm_encoder *clone_encoder; -uint32_t index_mask =0 ; +uint32_t index_mask =drm_encoder_mask (encoder);int count;/* DIG routing gets problematic */
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +1 -0
@@ -1417,6 +1417,7 @@ static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev,DRM_ERROR ("Surface size cannot exceed %dx%d\n" , dev_priv->texture_max_width, dev_priv->texture_max_height); + ret = -EINVAL ; goto err_out; }
drivers/iio/adc/Kconfig +4 -0
@@ -1131,6 +1131,8 @@ config TI_ADS8344 config TI_ADS8688 tristate "Texas Instruments ADS8688" depends on SPI && OF + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER help If you say yes here you get support for Texas Instruments ADS8684 and and ADS8688 ADC chips
@@ -1141,6 +1143,8 @@ config TI_ADS8688 config TI_ADS124S08 tristate "Texas Instruments ADS124S08" depends on SPI && OF + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER help If you say yes here you get support for Texas Instruments ADS124S08 and ADS124S06 ADC chips
drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1 -1
@@ -32,7 +32,7 @@ static ssize_t _hid_sensor_set_report_latency(struct device *dev, latency = integer *1000 + fract /1000 ; ret =hid_sensor_set_report_latency (attrb, latency);if (ret <0 ) -return len; +return ret; attrb->latency_ms =hid_sensor_get_report_latency (attrb);
drivers/iio/dac/Kconfig +3 -0
@@ -203,6 +203,7 @@ config AD5766 config AD5770R tristate "Analog Devices AD5770R IDAC driver" depends on SPI_MASTER + select REGMAP_SPI help Say yes here to build support for Analog Devices AD5770R Digital to Analog Converter.
@@ -283,6 +284,7 @@ config LPC18XX_DAC config LTC1660 tristate "Linear Technology LTC1660/LTC1665 DAC SPI driver" depends on SPI + select REGMAP_SPI help Say yes here to build support for Linear Technology LTC1660 and LTC1665 Digital to Analog Converters.
@@ -369,6 +371,7 @@ config STM32_DAC config STM32_DAC_CORE tristate + select REGMAP_MMIO config TI_DAC082S085 tristate "Texas Instruments 8/10/12-bit 2/4-channel DAC driver"
drivers/iio/light/opt3001.c +4 -0
@@ -138,6 +138,10 @@ static const struct opt3001_scale opt3001_scales[] = { .val = 20966, .val2 = 400000, }, + { + .val = 41932, + .val2 = 800000, + }, { .val = 83865, .val2 = 600000,
drivers/iio/light/veml6030.c +2 -3
@@ -99,9 +99,8 @@ static const char * const period_values[] = {static ssize_t in_illuminance_period_available_show (struct device *dev,struct device_attribute *attr,char *buf) { +struct veml6030_data *data =iio_priv (dev_to_iio_dev (dev));int ret, reg, x; -struct iio_dev *indio_dev =i2c_get_clientdata (to_i2c_client (dev)); -struct veml6030_data *data =iio_priv (indio_dev); ret =regmap_read (data->regmap,VEML6030_REG_ALS_CONF , ®);if (ret) {
@@ -780,7 +779,7 @@ static int veml6030_hw_init(struct iio_dev *indio_dev)/* Cache currently active measurement parameters */ data->cur_gain =3 ; - data->cur_resolution =4608 ; + data->cur_resolution =5376 ; data->cur_integration_time =3 ;return ret;
drivers/iio/proximity/Kconfig +2 -0
@@ -60,6 +60,8 @@ config LIDAR_LITE_V2 config MB1232 tristate "MaxSonar I2CXL family ultrasonic sensors" depends on I2C + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER help Say Y to build a driver for the ultrasonic sensors I2CXL of MaxBotix which have an i2c interface. It can be used to measure
drivers/iommu/intel/iommu.c +3 -1
@@ -4465,8 +4465,10 @@ static int domain_context_clear_one_cb(struct pci_dev *pdev, u16 alias, void *op*/ static void domain_context_clear (struct device_domain_info *info) { -if (!dev_is_pci (info->dev)) +if (!dev_is_pci (info->dev)) {domain_context_clear_one (info, info->bus, info->devfn); +return ; + }pci_for_each_dma_alias (to_pci_dev (info->dev), &domain_context_clear_one_cb, info);
drivers/irqchip/irq-gic-v3-its.c +19 -7
@@ -779,6 +779,7 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,struct its_cmd_block *cmd, struct its_cmd_desc *desc) { + struct its_vpe *vpe = valid_vpe(its, desc->its_vmapp_cmd.vpe);unsigned long vpt_addr, vconf_addr;u64 target;bool alloc;
@@ -788,9 +789,14 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,its_encode_valid (cmd, desc->its_vmapp_cmd.valid);if (!desc->its_vmapp_cmd.valid) { + alloc = !atomic_dec_return (&desc->its_vmapp_cmd.vpe->vmapp_count);if (is_v4_1 (its)) { - alloc = !atomic_dec_return (&desc->its_vmapp_cmd.vpe->vmapp_count);its_encode_alloc (cmd, alloc); +/* +* Unmapping a VPE is self-synchronizing on GICv4.1, +* no need to issue a VSYNC. +*/ + vpe =NULL ; } goto out;
@@ -803,13 +809,13 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,its_encode_vpt_addr (cmd, vpt_addr);its_encode_vpt_size (cmd,LPI_NRBITS -1 ); + alloc = !atomic_fetch_inc (&desc->its_vmapp_cmd.vpe->vmapp_count); +if (!is_v4_1 (its)) goto out; vconf_addr =virt_to_phys (page_address (desc->its_vmapp_cmd.vpe->its_vm->vprop_page)); - alloc = !atomic_fetch_inc (&desc->its_vmapp_cmd.vpe->vmapp_count); -its_encode_alloc (cmd, alloc);/*
@@ -825,7 +831,7 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its, out:its_fixup_cmd (cmd); -return valid_vpe (its, desc->its_vmapp_cmd.vpe); +return vpe; } static struct its_vpe *its_build_vmapti_cmd(struct its_node *its,
@@ -3804,6 +3810,13 @@ static int its_vpe_set_affinity(struct irq_data *d,unsigned long flags;int from, cpu; +/* +* Check if we're racing against a VPE being destroyed, for +* which we don't want to allow a VMOVP. +*/ +if (!atomic_read (&vpe->vmapp_count)) +return -EINVAL ; +/* * Changing affinity is mega expensive, so let's be as lazy as * we can and only do it if we really have to. Also, if mapped
@@ -4440,9 +4453,8 @@ static int its_vpe_init(struct its_vpe *vpe)raw_spin_lock_init (&vpe->vpe_lock); vpe->vpe_id = vpe_id; vpe->vpt_page = vpt_page; -if (gic_rdists->has_rvpeid) -atomic_set (&vpe->vmapp_count,0 ); -else +atomic_set (&vpe->vmapp_count,0 ); +if (!gic_rdists->has_rvpeid) vpe->vpe_proxy_event =-1 ;return 0 ;
drivers/md/dm-crypt.c +2 -35
@@ -69,10 +69,8 @@ struct dm_crypt_io {struct bio *base_bio;u8 *integrity_metadata; bool integrity_metadata_from_pool:1; - bool in_tasklet:1;struct work_struct work; -struct tasklet_struct tasklet;struct convert_context ctx;
@@ -1725,7 +1723,6 @@ static void crypt_io_init(struct dm_crypt_io *io, struct crypt_config *cc, io->ctx.r.req =NULL ; io->integrity_metadata =NULL ; io->integrity_metadata_from_pool = false; - io->in_tasklet = false;atomic_set (&io->io_pending,0 ); }
@@ -1734,12 +1731,6 @@ static void crypt_inc_pending(struct dm_crypt_io *io)atomic_inc (&io->io_pending); } -static void kcryptd_io_bio_endio (struct work_struct *work) -{ - struct dm_crypt_io *io = container_of(work, struct dm_crypt_io, work); -bio_endio (io->base_bio); -} -/* * One of the bios was finished. Check for completion of * the whole request and correctly clean up the buffer.
@@ -1763,20 +1754,6 @@ static void crypt_dec_pending(struct dm_crypt_io *io) base_bio->bi_status = error; -/* -* If we are running this function from our tasklet, -* we can't call bio_endio() here, because it will call -* clone_endio() from dm.c, which in turn will -* free the current struct dm_crypt_io structure with -* our tasklet. In this case we need to delay bio_endio() -* execution to after the tasklet is done and dequeued. -*/ -if (io->in_tasklet) { -INIT_WORK (&io->work, kcryptd_io_bio_endio); -queue_work (cc->io_queue, &io->work); -return ; - } -bio_endio (base_bio); }
@@ -2220,11 +2197,6 @@ static void kcryptd_crypt(struct work_struct *work)kcryptd_crypt_write_convert (io); } -static void kcryptd_crypt_tasklet (unsigned long work) -{ -kcryptd_crypt ((struct work_struct *)work); -} -static void kcryptd_queue_crypt (struct dm_crypt_io *io) {struct crypt_config *cc = io->cc;
@@ -2236,15 +2208,10 @@ static void kcryptd_queue_crypt(struct dm_crypt_io *io)* irqs_disabled(): the kernel may run some IO completion from the idle thread, but * it is being executed with irqs disabled. */ -if (in_hardirq () ||irqs_disabled ()) { - io->in_tasklet = true; -tasklet_init (&io->tasklet, kcryptd_crypt_tasklet, (unsigned long )&io->work); -tasklet_schedule (&io->tasklet); +if (!(in_hardirq () ||irqs_disabled ())) { +kcryptd_crypt (&io->work);return ; } - -kcryptd_crypt (&io->work); -return ; }INIT_WORK (&io->work, kcryptd_crypt);
drivers/net/ethernet/cadence/macb_main.c +11 -3
@@ -902,9 +902,6 @@ static int macb_mdiobus_register(struct macb *bp) {struct device_node *child, *np = bp->pdev->dev.of_node; -if (of_phy_is_fixed_link (np)) -return mdiobus_register (bp->mii_bus); -/* Only create the PHY from the device tree if at least one PHY is * described. Otherwise scan the entire MDIO bus. We do this to support * old device tree that did not follow the best practices and did not
@@ -925,8 +922,19 @@ static int macb_mdiobus_register(struct macb *bp)static int macb_mii_init (struct macb *bp) { +struct device_node *child, *np = bp->pdev->dev.of_node;int err = -ENXIO ; +/* With fixed-link, we don't need to register the MDIO bus, +* except if we have a child named "mdio" in the device tree. +* In that case, some devices may be attached to the MACB's MDIO bus. +*/ + child =of_get_child_by_name (np,"mdio" ); +if (child) +of_node_put (child); +else if (of_phy_is_fixed_link (np)) +return macb_mii_probe (bp->dev); +/* Enable management port */ macb_writel (bp,NCR ,MACB_BIT (MPE ));
drivers/net/ethernet/freescale/enetc/enetc.c +1 -1
@@ -1223,7 +1223,6 @@ static void enetc_xdp_drop(struct enetc_bdr *rx_ring, int rx_ring_first, &rx_ring->rx_swbd[rx_ring_first]);enetc_bdr_idx_inc (rx_ring, &rx_ring_first); } - rx_ring->stats.xdp_drops++; } static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring,
@@ -1280,6 +1279,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring, fallthrough;case XDP_DROP :enetc_xdp_drop (rx_ring, orig_i, i); + rx_ring->stats.xdp_drops++;break ;case XDP_PASS : rxbd = orig_rxbd;
drivers/parport/procfs.c +11 -11
@@ -51,12 +51,12 @@ static int do_active_device(struct ctl_table *table, int write,for (dev = port->devices; dev ; dev = dev->next) {if (dev == port->cad) { - len +=snprintf (buffer,sizeof (buffer),"%s\n" , dev->name); + len +=scnprintf (buffer,sizeof (buffer),"%s\n" , dev->name); } }if (!len) { - len +=snprintf (buffer,sizeof (buffer),"%s\n" ,"none" ); + len +=scnprintf (buffer,sizeof (buffer),"%s\n" ,"none" ); }if (len > *lenp)
@@ -87,19 +87,19 @@ static int do_autoprobe(struct ctl_table *table, int write, }if ((str = info->class_name) !=NULL ) - len +=snprintf (buffer + len,sizeof (buffer) - len,"CLASS:%s;\n" , str); + len +=scnprintf (buffer + len,sizeof (buffer) - len,"CLASS:%s;\n" , str);if ((str = info->model) !=NULL ) - len +=snprintf (buffer + len,sizeof (buffer) - len,"MODEL:%s;\n" , str); + len +=scnprintf (buffer + len,sizeof (buffer) - len,"MODEL:%s;\n" , str);if ((str = info->mfr) !=NULL ) - len +=snprintf (buffer + len,sizeof (buffer) - len,"MANUFACTURER:%s;\n" , str); + len +=scnprintf (buffer + len,sizeof (buffer) - len,"MANUFACTURER:%s;\n" , str);if ((str = info->description) !=NULL ) - len +=snprintf (buffer + len,sizeof (buffer) - len,"DESCRIPTION:%s;\n" , str); + len +=scnprintf (buffer + len,sizeof (buffer) - len,"DESCRIPTION:%s;\n" , str);if ((str = info->cmdset) !=NULL ) - len +=snprintf (buffer + len,sizeof (buffer) - len,"COMMAND SET:%s;\n" , str); + len +=scnprintf (buffer + len,sizeof (buffer) - len,"COMMAND SET:%s;\n" , str);if (len > *lenp) len = *lenp;
@@ -128,7 +128,7 @@ static int do_hardware_base_addr(struct ctl_table *table, int write,if (write)/* permissions prevent this anyway */ return -EACCES ; - len +=snprintf (buffer,sizeof (buffer),"%lu\t%lu\n" , port->base, port->base_hi); + len +=scnprintf (buffer,sizeof (buffer),"%lu\t%lu\n" , port->base, port->base_hi);if (len > *lenp) len = *lenp;
@@ -155,7 +155,7 @@ static int do_hardware_irq(struct ctl_table *table, int write,if (write)/* permissions prevent this anyway */ return -EACCES ; - len +=snprintf (buffer,sizeof (buffer),"%d\n" , port->irq); + len +=scnprintf (buffer,sizeof (buffer),"%d\n" , port->irq);if (len > *lenp) len = *lenp;
@@ -182,7 +182,7 @@ static int do_hardware_dma(struct ctl_table *table, int write,if (write)/* permissions prevent this anyway */ return -EACCES ; - len +=snprintf (buffer,sizeof (buffer),"%d\n" , port->dma); + len +=scnprintf (buffer,sizeof (buffer),"%d\n" , port->dma);if (len > *lenp) len = *lenp;
@@ -213,7 +213,7 @@ static int do_hardware_modes(struct ctl_table *table, int write,#define printmode (x) \ do { \ if (port->modes & PARPORT_MODE_##x) \ - len += snprintf(buffer + len, sizeof(buffer) - len, "%s%s", f++ ? "," : "", #x); \ + len += scnprintf(buffer + len, sizeof(buffer) - len, "%s%s", f++ ? "," : "", #x); \ } while (0)int f =0 ;printmode (PCSPP );
drivers/pinctrl/pinctrl-ocelot.c +4 -4
@@ -1279,21 +1279,21 @@ static void ocelot_irq_handler(struct irq_desc *desc)unsigned int reg =0 , irq, i;unsigned long irqs; +chained_irq_enter (parent_chip, desc); +for (i =0 ; i < info->stride; i++) {regmap_read (info->map, id_reg +4 * i, ®);if (!reg)continue ; -chained_irq_enter (parent_chip, desc); - irqs = reg;for_each_set_bit (irq, &irqs,min (32U , info->desc->npins -32 * i))generic_handle_domain_irq (chip->irq.domain, irq +32 * i); - -chained_irq_exit (parent_chip, desc); } + +chained_irq_exit (parent_chip, desc); } static int ocelot_gpiochip_register(struct platform_device *pdev,
drivers/s390/char/sclp_vt220.c +2 -2
@@ -320,7 +320,7 @@ sclp_vt220_add_msg(struct sclp_vt220_request *request, buffer = (void *) ((addr_t ) sccb + sccb->header.length);if (convertlf) { -/* Perform Linefeed conversion (0x0a -> 0x0a 0x0d)*/ +/* Perform Linefeed conversion (0x0a -> 0x0d 0x0a)*/ for (from=0 , to=0 ; (from < count) && (to <sclp_vt220_space_left (request)); from++) {
@@ -329,8 +329,8 @@ sclp_vt220_add_msg(struct sclp_vt220_request *request,/* Perform conversion */ if (c ==0x0a ) {if (to +1 <sclp_vt220_space_left (request)) { - ((unsigned char *) buffer)[to++] = c; ((unsigned char *) buffer)[to++] =0x0d ; + ((unsigned char *) buffer)[to++] = c; }else break ;
drivers/usb/host/xhci-ring.c +1 -1
@@ -1013,7 +1013,7 @@ static int xhci_invalidate_cancelled_tds(struct xhci_virt_ep *ep)td_to_noop (xhci, ring, cached_td, false); cached_td->cancel_status =TD_CLEARED ; } - +td_to_noop (xhci, ring, td, false); td->cancel_status =TD_CLEARING_CACHE ; cached_td = td;break ;
drivers/usb/host/xhci.h +1 -1
@@ -1286,7 +1286,7 @@ enum xhci_setup_dev {/* Set TR Dequeue Pointer command TRB fields, 6.4.3.9 */ #define TRB_TO_STREAM_ID (p) ((((p) & (0xffff << 16)) >> 16))#define STREAM_ID_FOR_TRB (p) ((((p)) & 0xffff) << 16) -#define SCT_FOR_TRB (p) (((p) << 1) & 0x7) +#define SCT_FOR_TRB (p) (((p) & 0x7) << 1)/* Link TRB specific fields */ #define TRB_TC (1<<1)
drivers/usb/serial/option.c +8 -0
@@ -279,6 +279,7 @@ static void option_instat_callback(struct urb *urb);#define QUECTEL_PRODUCT_EG912Y 0x6001#define QUECTEL_PRODUCT_EC200S_CN 0x6002#define QUECTEL_PRODUCT_EC200A 0x6005 +#define QUECTEL_PRODUCT_EG916Q 0x6007#define QUECTEL_PRODUCT_EM061K_LWW 0x6008#define QUECTEL_PRODUCT_EM061K_LCN 0x6009#define QUECTEL_PRODUCT_EC200T 0x6026
@@ -1270,6 +1271,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG912Y, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG916Q, 0xff, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
@@ -1380,10 +1382,16 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a0, 0xff), /* Telit FN20C04 (rmnet) */ .driver_info = RSVD(0) | NCTRL(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a2, 0xff), /* Telit FN920C04 (MBIM) */ + .driver_info = NCTRL(4) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a4, 0xff), /* Telit FN20C04 (rmnet) */ .driver_info = RSVD(0) | NCTRL(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a7, 0xff), /* Telit FN920C04 (MBIM) */ + .driver_info = NCTRL(4) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a9, 0xff), /* Telit FN20C04 (rmnet) */ .driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10aa, 0xff), /* Telit FN920C04 (MBIM) */ + .driver_info = NCTRL(3) | RSVD(4) | RSVD(5) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
fs/fat/namei_vfat.c +1 -1
@@ -1020,7 +1020,7 @@ static int vfat_rename(struct user_namespace *mnt_userns, struct inode *old_dir,if (corrupt <0 ) {fat_fs_error (new_dir->i_sb,"%s: Filesystem corrupted (i_pos %lld)" , - __func__, sinfo.i_pos); + __func__, new_i_pos); } goto out; }
fs/nilfs2/dir.c +27 -23
81 lines not on this page · raw message
fs/nilfs2/namei.c +26 -13
@@ -55,12 +55,20 @@ nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) {struct inode *inode;ino_t ino; +int res;if (dentry->d_name.len >NILFS_NAME_LEN )return ERR_PTR (-ENAMETOOLONG ); - ino =nilfs_inode_by_name (dir, &dentry->d_name); - inode = ino ?nilfs_iget (dir->i_sb,NILFS_I (dir)->i_root, ino) :NULL ; + res =nilfs_inode_by_name (dir, &dentry->d_name, &ino); +if (res) { +if (res != -ENOENT ) +return ERR_PTR (res); + inode =NULL ; + }else { + inode =nilfs_iget (dir->i_sb,NILFS_I (dir)->i_root, ino); + } +return d_splice_alias (inode, dentry); }
@@ -263,10 +271,11 @@ static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry)struct page *page;int err; - err = -ENOENT ; de =nilfs_find_entry (dir, &dentry->d_name, &page); -if (!de) +if (IS_ERR (de)) { + err =PTR_ERR (de); goto out; + } inode =d_inode (dentry); err = -EIO ;
@@ -361,10 +370,11 @@ static int nilfs_rename(struct user_namespace *mnt_userns,if (unlikely (err))return err; - err = -ENOENT ; old_de =nilfs_find_entry (old_dir, &old_dentry->d_name, &old_page); -if (!old_de) +if (IS_ERR (old_de)) { + err =PTR_ERR (old_de); goto out; + }if (S_ISDIR (old_inode->i_mode)) { err = -EIO ;
@@ -381,10 +391,12 @@ static int nilfs_rename(struct user_namespace *mnt_userns,if (dir_de && !nilfs_empty_dir (new_inode)) goto out_dir; - err = -ENOENT ; - new_de =nilfs_find_entry (new_dir, &new_dentry->d_name, &new_page); -if (!new_de) + new_de =nilfs_find_entry (new_dir, &new_dentry->d_name, + &new_page); +if (IS_ERR (new_de)) { + err =PTR_ERR (new_de); goto out_dir; + }nilfs_set_link (new_dir, new_de, new_page, old_inode);nilfs_mark_inode_dirty (new_dir); new_inode->i_ctime =current_time (new_inode);
@@ -438,13 +450,14 @@ static int nilfs_rename(struct user_namespace *mnt_userns,*/ static struct dentry *nilfs_get_parent (struct dentry *child) { -unsigned long ino; +ino_t ino; +int res;struct inode *inode;struct nilfs_root *root; - ino =nilfs_inode_by_name (d_inode (child), &dotdot_name); -if (!ino) -return ERR_PTR (-ENOENT ); + res =nilfs_inode_by_name (d_inode (child), &dotdot_name, &ino); +if (res) +return ERR_PTR (res); root =NILFS_I (d_inode (child))->i_root;
fs/nilfs2/nilfs.h +1 -1
@@ -233,7 +233,7 @@ static inline __u32 nilfs_mask_flags(umode_t mode, __u32 flags)/* dir.c */ extern int nilfs_add_link (struct dentry *,struct inode *); -extern ino_t nilfs_inode_by_name (struct inode *,const struct qstr *); +int nilfs_inode_by_name (struct inode *dir,const struct qstr *qstr,ino_t *ino);extern int nilfs_make_empty (struct inode *,struct inode *);extern struct nilfs_dir_entry *nilfs_find_entry (struct inode *,const struct qstr *,struct page **);
fs/udf/dir.c +27 -121
198 lines not on this page · raw message
fs/udf/directory.c +419 -145
602 lines not on this page · raw message
fs/udf/inode.c +0 -90
96 lines not on this page · raw message
fs/udf/namei.c +354 -696
1,161 lines not on this page · raw message
fs/udf/udfdecl.h +23 -22
45 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.