Merge 4.19.202 into android-4.19-stable
Linux 4.19.202
spi: mediatek: Fix fifo transfer
* padata: add separate cpuhp node for CPUHP_PADATA_DEAD
include/linux/padata.h
* padata: validate cpumask without removed CPU during offline
include/linux/cpuhotplug.h
Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout"
firmware: arm_scmi: Ensure drivers provide a probe function
drm/i915: Ensure intel_engine_init_execlist() builds with Clang
* Revert "Bluetooth: Shutdown controller after workqueues are flushed or cancelled"
net/bluetooth/hci_core.c
* bdi: add a ->dev_name field to struct backing_dev_info
include/linux/backing-dev-defs.h
mm/backing-dev.c
* bdi: use bdi_dev_name() to get device name
block/blk-cgroup.c
include/trace/events/wbt.h
* bdi: move bdi_dev_name out of line
include/linux/backing-dev.h
mm/backing-dev.c
* net: Fix zero-copy head len calculation.
net/core/skbuff.c
qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()
* r8152: Fix potential PM refcount imbalance
drivers/net/usb/r8152.c
ASoC: tlv320aic31xx: fix reversed bclk/wclk master bits
* regulator: rt5033: Fix n_voltages settings for BUCK and LDO
include/linux/mfd/rt5033-private.h
btrfs: mark compressed range uptodate only if all bio succeed
Merge 4.19.201 into android-4.19-stable
Linux 4.19.201
i40e: Add additional info to PHY type error
Revert "perf map: Fix dso->nsinfo refcounting"
powerpc/pseries: Fix regression while building external modules
can: hi311x: fix a signedness bug in hi3110_cmd()
sis900: Fix missing pci_disable_device() in probe and remove
tulip: windbond-840: Fix missing pci_disable_device() in probe and remove
* sctp: fix return value check in __sctp_rcv_asconf_lookup
net/sctp/input.c
net/mlx5: Fix flow table chaining
* net: llc: fix skb_over_panic
include/net/llc_pdu.h
mlx4: Fix missing error code in mlx4_load_one()
* tipc: fix sleeping in tipc accept routine
net/tipc/socket.c
i40e: Fix log TC creation failure when max num of queues is exceeded
i40e: Fix logic of disabling queues
netfilter: nft_nat: allow to specify layer 4 protocol NAT only
* netfilter: conntrack: adjust stop timestamp to real expiry value
net/netfilter/nf_conntrack_core.c
* cfg80211: Fix possible memory leak in function cfg80211_bss_update
net/wireless/scan.c
nfc: nfcsim: fix use after free during module unload
NIU: fix incorrect error return, missed in previous revert
can: esd_usb2: fix memory leak
can: ems_usb: fix memory leak
can: usb_8dev: fix memory leak
can: mcba_usb_start(): add missing urb->transfer_dma initialization
can: raw: raw_setsockopt(): fix raw_rcv panic for sock UAF
ocfs2: issue zeroout to EOF blocks
ocfs2: fix zero out valid data
x86/kvm: fix vcpu-id indexed array sizes
btrfs: fix rw device counting in __btrfs_free_extra_devids
x86/asm: Ensure asm/proto.h can be included stand-alone
* gro: ensure frag0 meets IP header alignment
include/linux/skbuff.h
net/core/dev.c
* virtio_net: Do not pull payload in skb->head
include/linux/virtio_net.h
Merge 4.19.200 into android-4.19-stable
Linux 4.19.200
ARM: dts: versatile: Fix up interrupt controller node names
cifs: fix the out of range assignment to bit fields in parse_server_interfaces
firmware: arm_scmi: Fix range check for the maximum number of pending messages
firmware: arm_scmi: Fix possible scmi_linux_errmap buffer overflow
hfs: add lock nesting notation to hfs_find_init
hfs: fix high memory mapping in hfs_bnode_read
hfs: add missing clean-up in hfs_fill_super
* sctp: move 198 addresses from unusable to private scope
include/net/sctp/constants.h
net/sctp/protocol.c
* net: annotate data race around sk_ll_usec
include/net/busy_poll.h
net/core/sock.c
net/802/garp: fix memleak in garp_request_join()
net/802/mrp: fix memleak in mrp_request_join()
* workqueue: fix UAF in pwq_unbound_release_workfn()
kernel/workqueue.c
* af_unix: fix garbage collect vs MSG_PEEK
net/unix/af_unix.c
* net: split out functions related to registering inflight socket files
include/net/af_unix.h
net/Makefile
net/unix/Kconfig
net/unix/Makefile
net/unix/af_unix.c
net/unix/garbage.c
net/unix/scm.c
net/unix/scm.h
KVM: x86: determine if an exception has an error code only when injecting it.
iio: dac: ds4422/ds4424 drop of_node check
selftest: fix build error in tools/testing/selftests/vm/userfaultfd.c
* ANDROID: staging: ion: move buffer kmap from begin/end_cpu_access()
drivers/staging/android/ion/ion.c
Merge 4.19.199 into android-4.19-stable
Linux 4.19.199
* xhci: add xhci_get_virt_ep() helper
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.h
spi: spi-fsl-dspi: Fix a resource leak in an error handling path
* PCI: Mark AMD Navi14 GPU ATS as broken
drivers/pci/quirks.c
btrfs: compression: don't try to compress if we don't have enough pages
iio: accel: bma180: Fix BMA25x bandwidth register values
iio: accel: bma180: Use explicit member assignment
net: bcmgenet: ensure EXT_ENERGY_DET_MASK is clear
net: dsa: mv88e6xxx: use correct .stats_set_histogram() on Topaz
KVM: Use kvm_pfn_t for local PFN variable in hva_to_pfn_remapped()
KVM: do not allow mapping valid but non-reference-counted pages
KVM: do not assume PTE is writable after follow_pfn
* drm: Return -ENOTTY for non-drm ioctls
drivers/gpu/drm/drm_ioctl.c
include/drm/drm_ioctl.h
nds32: fix up stack guard gap
selftest: use mmap instead of posix_memalign to allocate memory
ixgbe: Fix packet corruption due to missing DMA sync
media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf()
* tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop.
kernel/trace/ring_buffer.c
usb: dwc2: gadget: Fix sending zero length packet in DDMA mode.
USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick
USB: serial: cp210x: fix comments for GE CS1000
USB: serial: option: add support for u-blox LARA-R6 family
usb: renesas_usbhs: Fix superfluous irqs happen after usb_pkt_pop()
usb: max-3421: Prevent corruption of freed memory
USB: usb-storage: Add LaCie Rugged USB3-FW to IGNORE_UAS
* usb: hub: Fix link power management max exit latency (MEL) calculations
drivers/usb/core/hub.c
* usb: hub: Disable USB 3 device initiated lpm if exit latency is too high
drivers/usb/core/hub.c
KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow
* xhci: Fix lost USB 2 remote wake
drivers/usb/host/xhci-hub.c
ALSA: sb: Fix potential ABBA deadlock in CSP driver
* ALSA: usb-audio: Add registration quirk for JBL Quantum headsets
sound/usb/quirks.c
s390/ftrace: fix ftrace_update_ftrace_func implementation
Revert "MIPS: add PMD table accounting into MIPS'pmd_alloc_one"
* proc: Avoid mixing integer types in mem_rw()
fs/proc/base.c
drm/panel: raspberrypi-touchscreen: Prevent double-free
* net: sched: cls_api: Fix the the wrong parameter
net/sched/cls_api.c
* sctp: update active_key for asoc when old key is being replaced
net/sctp/auth.c
* Revert "USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem"
drivers/usb/core/quirks.c
nvme-pci: don't WARN_ON in nvme_reset_work if ctrl.state is not RESETTING
net/sched: act_skbmod: Skip non-Ethernet packets
* net/tcp_fastopen: fix data races around tfo_active_disable_stamp
net/ipv4/tcp_fastopen.c
spi: cadence: Correct initialisation of runtime PM again
scsi: target: Fix protect handling in WRITE SAME(32)
scsi: iscsi: Fix iface sysfs attr detection
netrom: Decrease sock refcount when sock timers expire
KVM: PPC: Fix kvm_arch_vcpu_ioctl vcpu_load leak
net: decnet: Fix sleeping inside in af_decnet
net: fix uninit-value in caif_seqpkt_sendmsg
bpftool: Check malloc return value in mount_bpffs_for_pin
s390/bpf: Perform r1 range checking before accessing jit->seen_reg[r1]
liquidio: Fix unintentional sign extension issue on left shift of u16
spi: mediatek: fix fifo rx mode
perf probe-file: Delete namelist in del_events() on the error path
perf test bpf: Free obj_buf
perf lzma: Close lzma stream on exit
perf dso: Fix memory leak in dso__new_map()
perf probe: Fix dso->nsinfo refcounting
perf map: Fix dso->nsinfo refcounting
nvme-pci: do not call nvme_dev_remove_admin from nvme_remove
* ipv6: fix 'disable_policy' for fwd packets
net/ipv6/ip6_output.c
igb: Fix position of assignment to *ring
igb: Check if num of q_vectors is smaller than max before array access
iavf: Fix an error handling path in 'iavf_probe()'
e1000e: Fix an error handling path in 'e1000_probe()'
fm10k: Fix an error handling path in 'fm10k_probe()'
igb: Fix an error handling path in 'igb_probe()'
ixgbe: Fix an error handling path in 'ixgbe_probe()'
igb: Fix use-after-free error during reset
* net: ip_tunnel: fix mtu calculation for ETHER tunnel devices
net/ipv4/ip_tunnel.c
* udp: annotate data races around unix_sk(sk)->gso_size
net/ipv4/udp.c
net/ipv6/udp.c
bpftool: Properly close va_list 'ap' by va_end() on error
* ipv6: tcp: drop silly ICMPv6 packet too big messages
net/ipv4/tcp_output.c
net/ipv6/tcp_ipv6.c
* tcp: annotate data races around tp->mtu_info
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c
* dma-buf/sync_file: Don't leak fences on merge failure
drivers/dma-buf/sync_file.c
* net: validate lwtstate->data before returning from skb_tunnel_info()
include/net/dst_metadata.h
* net: send SYNACK packet with accepted fwmark
net/ipv6/tcp_ipv6.c
net: ti: fix UAF in tlan_remove_one
net: qcom/emac: fix UAF in emac_remove
net: moxa: fix UAF in moxart_mac_probe
net: bcmgenet: Ensure all TX/RX queues DMAs are disabled
* net: bridge: sync fdb to new unicast-filtering ports
net/bridge/br_if.c
* netfilter: ctnetlink: suspicious RCU usage in ctnetlink_dump_helpinfo
net/netfilter/nf_conntrack_netlink.c
* net: ipv6: fix return value of ip6_skb_dst_mtu
include/net/ip6_route.h
net/ipv6/xfrm6_output.c
net: dsa: mv88e6xxx: enable .rmu_disable() on Topaz
dm writecache: fix writing beyond end of underlying device when shrinking
dm writecache: return the exact table values that were set
* mm: slab: fix kmem_cache_create failed when sysfs node not destroyed
mm/slab_common.c
* sched/fair: Fix CFS bandwidth hrtimer expiry type
kernel/sched/fair.c
scsi: libfc: Fix array index out of bound exception
scsi: libsas: Add LUN number check in .slave_alloc callback
scsi: aic7xxx: Fix unintentional sign extension issue on left shift of u8
rtc: max77686: Do not enforce (incorrect) interrupt trigger type
* kbuild: mkcompile_h: consider timestamp if KBUILD_BUILD_TIMESTAMP is set
scripts/mkcompile_h
* thermal/core: Correct function name thermal_zone_device_unregister()
drivers/thermal/thermal_core.c
arm64: dts: ls208xa: remove bus-num from dspi node
soc/tegra: fuse: Fix Tegra234-only builds
ARM: dts: stm32: move stmmac axi config in ethernet node on stm32mp15
ARM: dts: stm32: fix i2c node name on stm32f746 to prevent warnings
ARM: dts: rockchip: fix supply properties in io-domains nodes
arm64: dts: juno: Update SCPI nodes as per the YAML schema
ARM: dts: stm32: fix timer nodes on STM32 MCU to prevent warnings
ARM: dts: stm32: fix RCC node name on stm32f429 MCU
ARM: dts: stm32: fix gpio-keys node on STM32 MCU boards
rtc: mxc_v2: add missing MODULE_DEVICE_TABLE
ARM: imx: pm-imx5: Fix references to imx5_cpu_suspend_info
ARM: dts: imx6: phyFLEX: Fix UART hardware flow control
ARM: dts: Hurricane 2: Fix NAND nodes names
ARM: dts: BCM63xx: Fix NAND nodes names
ARM: NSP: dts: fix NAND nodes names
ARM: Cygnus: dts: fix NAND nodes names
ARM: brcmstb: dts: fix NAND nodes names
reset: ti-syscon: fix to_ti_syscon_reset_data macro
arm64: dts: rockchip: Fix power-controller node names for rk3328
ARM: dts: rockchip: Fix power-controller node names for rk3288
ARM: dts: rockchip: Fix IOMMU nodes properties on rk322x
ARM: dts: rockchip: Fix the timer clocks order
arm64: dts: rockchip: fix pinctrl sleep nodename for rk3399.dtsi
ARM: dts: rockchip: fix pinctrl sleep nodename for rk3036-kylin and rk3288
ARM: dts: gemini: add device_type on pci
ARM: dts: gemini: rename mdio to the right name
* ANDROID: generate_initcall_order.pl: Use two dash long options for llvm-nm
scripts/generate_initcall_order.pl
* Revert "media: subdev: disallow ioctl for saa6588/davinci"
include/media/v4l2-subdev.h
* ANDROID: GKI: fix up crc change in ip.h
include/net/ip.h
Merge 4.19.198 into android-4.19-stable
Linux 4.19.198
* seq_file: disallow extremely large seq buffer allocations
fs/seq_file.c
scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg()
* net: bridge: multicast: fix PIM hello router port marking race
net/bridge/br_multicast.c
MIPS: vdso: Invalid GIC access through VDSO
mips: disable branch profiling in boot/decompress.o
mips: always link byteswap helpers into decompressor
scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe()
ARM: dts: imx6q-dhcom: Add gpios pinctrl for i2c bus recovery
ARM: dts: imx6q-dhcom: Fix ethernet plugin detection problems
ARM: dts: imx6q-dhcom: Fix ethernet reset time properties
ARM: dts: am437x: align ti,pindir-d0-out-d1-in property with dt-shema
ARM: dts: am335x: align ti,pindir-d0-out-d1-in property with dt-shema
memory: fsl_ifc: fix leak of private memory on probe failure
memory: fsl_ifc: fix leak of IO mapping on probe failure
* reset: bail if try_module_get() fails
drivers/reset/core.c
ARM: dts: BCM5301X: Fixup SPI binding
ARM: dts: r8a7779, marzen: Fix DU clock names
arm64: dts: renesas: v3msk: Fix memory size
* rtc: fix snprintf() checking in is_rtc_hctosys()
drivers/rtc/rtc-proc.c
memory: atmel-ebi: add missing of_node_put for loop iteration
ARM: dts: exynos: fix PWM LED max brightness on Odroid XU4
ARM: dts: exynos: fix PWM LED max brightness on Odroid HC1
ARM: dts: exynos: fix PWM LED max brightness on Odroid XU/XU3
reset: a10sr: add missing of_match_table reference
hexagon: use common DISCARDS macro
NFSv4/pNFS: Don't call _nfs4_pnfs_v3_ds_connect multiple times
ALSA: isa: Fix error return code in snd_cmi8330_probe()
virtio_net: move tx vq operation under tx queue lock
x86/fpu: Limit xstate copy size in xstateregs_set()
PCI: iproc: Support multi-MSI only on uniprocessor kernel
PCI: iproc: Fix multi-MSI base vector number allocation
ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode
nfs: fix acl memory leak of posix_acl_create()
watchdog: aspeed: fix hardware timeout calculation
um: fix error return code in winch_tramp()
um: fix error return code in slip_open()
NFSv4: Initialise connection to the server in nfs4_alloc_client()
* power: supply: rt5033_battery: Fix device tree enumeration
drivers/power/supply/Kconfig
PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun
* f2fs: add MODULE_SOFTDEP to ensure crc32 is included in the initramfs
fs/f2fs/super.c
virtio_console: Assure used length from device is limited
virtio_net: Fix error handling in virtnet_restore()
virtio-blk: Fix memory leak among suspend/resume procedure
ACPI: video: Add quirk for the Dell Vostro 3350
ACPI: AMBA: Fix resource name in /proc/iomem
pwm: tegra: Don't modify HW state in .remove callback
power: supply: ab8500: add missing MODULE_DEVICE_TABLE
power: supply: charger-manager: add missing MODULE_DEVICE_TABLE
* NFS: nfs_find_open_context() may only select open files
include/linux/nfs_fs.h
ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty
orangefs: fix orangefs df output.
PCI: tegra: Add missing MODULE_DEVICE_TABLE
x86/fpu: Return proper error codes from user access functions
watchdog: iTCO_wdt: Account for rebooting on second timeout
watchdog: Fix possible use-after-free by calling del_timer_sync()
watchdog: sc520_wdt: Fix possible use-after-free in wdt_turnoff()
watchdog: Fix possible use-after-free in wdt_startup()
ARM: 9087/1: kprobes: test-thumb: fix for LLVM_IAS=1
power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE
power: supply: max17042: Do not enforce (incorrect) interrupt trigger type
power: supply: ab8500: Avoid NULL pointers
pwm: spear: Don't modify HW state in .remove callback
* lib/decompress_unlz4.c: correctly handle zero-padding around initrds.
lib/decompress_unlz4.c
* i2c: core: Disable client irq on reboot/shutdown
drivers/i2c/i2c-core-base.c
intel_th: Wait until port is in reset before programming it
staging: rtl8723bs: fix macro value for 2.4Ghz only device
ALSA: hda: Add IRQ check for platform_get_irq()
backlight: lm3630a: Fix return code of .update_status() callback
powerpc/boot: Fixup device-tree on little endian
usb: gadget: hid: fix error return code in hid_bind()
* usb: gadget: f_hid: fix endianness issue with descriptors
drivers/usb/gadget/function/f_hid.c
* ALSA: bebob: add support for ToneWeal FW66
sound/firewire/Kconfig
Input: hideep - fix the uninitialized use in hideep_nvm_unlock()
* ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()
sound/soc/soc-core.c
gpio: pca953x: Add support for the On Semi pca9655
selftests/powerpc: Fix "no_handler" EBB selftest
ALSA: ppc: fix error return code in snd_pmac_probe()
gpio: zynq: Check return value of pm_runtime_get_sync
powerpc/ps3: Add dma_mask to ps3_dma_region
ALSA: sb: Fix potential double-free of CSP mixer elements
selftests: timers: rtcpie: skip test if default RTC device does not exist
s390/sclp_vt220: fix console name to match device
mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE
scsi: qedi: Fix null ref during abort handling
scsi: iscsi: Fix shost->max_id use
* scsi: iscsi: Fix conn use after free during resets
include/scsi/libiscsi.h
* scsi: iscsi: Add iscsi_cls_conn refcount helpers
include/scsi/scsi_transport_iscsi.h
fs/jfs: Fix missing error code in lmLogInit()
scsi: scsi_dh_alua: Check for negative result value
tty: serial: 8250: serial_cs: Fix a memory leak in error handling path
ALSA: ac97: fix PM reference leak in ac97_bus_remove()
* scsi: core: Cap scsi_host cmd_per_lun at can_queue
drivers/scsi/hosts.c
scsi: lpfc: Fix crash when lpfc_sli4_hba_setup() fails to initialize the SGLs
scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology
w1: ds2438: fixing bug that would always get page0
* Revert "ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro"
sound/firewire/Kconfig
misc/libmasm/module: Fix two use after free in ibmasm_init_one
tty: serial: fsl_lpuart: fix the potential risk of division or modulo by zero
PCI: aardvark: Fix kernel panic during PIO transfer
PCI: aardvark: Don't rely on jiffies while holding spinlock
tracing: Do not reference char * as a string in histograms
* scsi: core: Fix bad pointer dereference when ehandler kthread is invalid
drivers/scsi/hosts.c
KVM: X86: Disable hardware breakpoints unconditionally before kvm_x86->run()
KVM: x86: Use guest MAXPHYADDR from CPUID.0x8000_0008 iff TDP is enabled
* smackfs: restrict bytes count in smk_set_cipso()
security/smack/smackfs.c
jfs: fix GPF in diFree
pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq()
media: uvcvideo: Fix pixel format change for Elgato Cam Link 4K
media: gspca/sunplus: fix zero-length control requests
media: gspca/sq905: fix control-request direction
media: zr364xx: fix memory leak in zr364xx_start_readpipe
media: dtv5100: fix control-request directions
* media: subdev: disallow ioctl for saa6588/davinci
include/media/v4l2-subdev.h
PCI: aardvark: Fix checking for PIO Non-posted Request
* PCI: Leave Apple Thunderbolt controllers on for s2idle or standby
drivers/pci/quirks.c
dm btree remove: assign new_root only when removal succeeds
* coresight: tmc-etf: Fix global-out-of-bounds in tmc_update_etf_buffer()
drivers/hwtracing/coresight/coresight-tmc-etf.c
ipack/carriers/tpci200: Fix a double free in tpci200_pci_probe
* tracing: Resize tgid_map to pid_max, not PID_MAX_DEFAULT
kernel/trace/trace.c
* tracing: Simplify & fix saved_tgids logic
kernel/trace/trace.c
* seq_buf: Fix overflow in seq_buf_putmem_hex()
lib/seq_buf.c
* power: supply: ab8500: Fix an old bug
include/linux/mfd/abx500/ux500_chargalg.h
ipmi/watchdog: Stop watchdog timer when the current action is 'none'
qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute
ASoC: tegra: Set driver_name=tegra for all machine drivers
* clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround
drivers/clocksource/arm_arch_timer.c
* cpu/hotplug: Cure the cpusets trainwreck
kernel/cpu.c
ata: ahci_sunxi: Disable DIPM
mmc: core: Allow UHS-I voltage switch for SDSC cards if supported
mmc: core: clear flags before allowing to retune
mmc: sdhci: Fix warning message when accessing RPMB in HS400 mode
drm/msm/mdp4: Fix modifier support enabling
pinctrl/amd: Add device HID for new AMD GPIO controller
drm/amd/display: fix incorrrect valid irq check
drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create()
* usb: gadget: f_fs: Fix setting of device and driver data cross-references
drivers/usb/gadget/function/f_fs.c
powerpc/barrier: Avoid collision with clang's __lwsync macro
* fuse: reject internal errno
fs/fuse/dev.c
serial: mvebu-uart: fix calculation of clock divisor
serial: mvebu-uart: clarify the baud rate derivation
* bdi: Do not use freezable workqueue
mm/backing-dev.c
* fscrypt: don't ignore minor_hash when hash is 0
fs/crypto/fname.c
MIPS: set mips32r5 for virt extensions
* sctp: add size validation when walking chunks
net/sctp/input.c
* sctp: validate from_addr_param return
include/net/sctp/structs.h
net/sctp/bind_addr.c
net/sctp/input.c
net/sctp/ipv6.c
net/sctp/protocol.c
net/sctp/sm_make_chunk.c
Bluetooth: btusb: fix bt fiwmare downloading failure issue for qca btsoc.
* Bluetooth: Shutdown controller after workqueues are flushed or cancelled
net/bluetooth/hci_core.c
* Bluetooth: Fix the HCI to MGMT status conversion table
net/bluetooth/mgmt.c
RDMA/cma: Fix rdma_resolve_route() memory leak
* net: ip: avoid OOM kills with large UDP sends over loopback
net/ipv4/ip_output.c
net/ipv6/ip6_output.c
media, bpf: Do not copy more entries than user space requested
* wireless: wext-spy: Fix out-of-bounds warning
net/wireless/wext-spy.c
sfc: error code if SRIOV cannot be disabled
sfc: avoid double pci_remove of VFs
iwlwifi: pcie: free IML DMA memory allocation
iwlwifi: mvm: don't change band on bound PHY contexts
RDMA/rxe: Don't overwrite errno from ib_umem_get()
vsock: notify server to shutdown when client has pending signal
atm: nicstar: register the interrupt handler in the right place
atm: nicstar: use 'dma_free_coherent' instead of 'kfree'
MIPS: add PMD table accounting into MIPS'pmd_alloc_one
rtl8xxxu: Fix device info for RTL8192EU devices
* net: fix mistake path for netdev_features_strings
include/linux/netdev_features.h
include/uapi/linux/ethtool.h
cw1200: add missing MODULE_DEVICE_TABLE
wl1251: Fix possible buffer overflow in wl1251_cmd_scan
wlcore/wl12xx: Fix wl12xx get_mac error if device is in ELP
* xfrm: Fix error reporting in xfrm_state_construct.
net/xfrm/xfrm_user.c
* selinux: use __GFP_NOWARN with GFP_NOWAIT in the AVC
security/selinux/avc.c
fjes: check return value after calling platform_get_resource()
net: micrel: check return value after calling platform_get_resource()
net: mvpp2: check return value after calling platform_get_resource()
net: bcmgenet: check return value after calling platform_get_resource()
virtio_net: Remove BUG() to avoid machine dead
ice: set the value of global config lock timeout longer
pinctrl: mcp23s08: fix race condition in irq handler
dm space maps: don't reset space map allocation cursor when committing
RDMA/cxgb4: Fix missing error code in create_qp()
* ipv6: use prandom_u32() for ID generation
net/ipv6/output_core.c
clk: tegra: Ensure that PLLU configuration is applied properly
clk: renesas: r8a77995: Add ZA2 clock
e100: handle eeprom as little endian
udf: Fix NULL pointer dereference in udf_symlink function
drm/virtio: Fix double free on probe failure
reiserfs: add check for invalid 1st journal block
* net: Treat __napi_schedule_irqoff() as __napi_schedule() on PREEMPT_RT
net/core/dev.c
atm: nicstar: Fix possible use-after-free in nicstar_cleanup()
mISDN: fix possible use-after-free in HFC_cleanup()
atm: iphase: fix possible use-after-free in ia_module_exit()
hugetlb: clear huge pte during flush function on mips platform
drm/amd/display: fix use_max_lb flag for 420 pixel formats
net: pch_gbe: Use proper accessors to BE data in pch_ptp_match()
drm/amd/amdgpu/sriov disable all ip hw status by default
* drm/zte: Don't select DRM_KMS_FB_HELPER
drivers/gpu/drm/zte/Kconfig
* drm/mxsfb: Don't select DRM_KMS_FB_HELPER
drivers/gpu/drm/mxsfb/Kconfig
mmc: vub3000: fix control-request direction
mmc: block: Disable CMDQ on the ioctl path
perf llvm: Return -ENOMEM when asprintf() fails
selftests/vm/pkeys: fix alloc_random_pkey() to make it really, really random
mm/huge_memory.c: don't discard hugepage if other processes are mapping it
vfio/pci: Handle concurrent vma faults
arm64: dts: marvell: armada-37xx: Fix reg for standard variant of UART
serial: mvebu-uart: correctly calculate minimal possible baudrate
powerpc: Offline CPU in stop_this_cpu()
leds: ktd2692: Fix an error handling path
leds: as3645a: Fix error return code in as3645a_parse_node()
* configfs: fix memleak in configfs_release_bin_file
fs/configfs/file.c
ASoC: atmel-i2s: Fix usage of capture and playback at the same time
extcon: max8997: Add missing modalias string
extcon: sm5502: Drop invalid register write in sm5502_reg_data
phy: ti: dm816x: Fix the error handling path in 'dm816x_usb_phy_probe()
scsi: mpt3sas: Fix error return value in _scsih_expander_add()
mtd: rawnand: marvell: add missing clk_disable_unprepare() on error in marvell_nfc_resume()
* of: Fix truncation of memory sizes on 32-bit platforms
drivers/of/fdt.c
drivers/of/of_reserved_mem.c
ASoC: cs42l42: Correct definition of CS42L42_ADC_PDN_MASK
iio: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
serial: 8250: Actually allow UPF_MAGIC_MULTIPLIER baud rates
staging: mt7621-dts: fix pci address for PCI memory range
staging: gdm724x: check for overflow in gdm_lte_netif_rx()
staging: gdm724x: check for buffer overflow in gdm_lte_multi_sdu_pkt()
iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()
iio: adc: mxs-lradc: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: adc: hx711: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
eeprom: idt_89hpesx: Restore printing the unsupported fwnode name
eeprom: idt_89hpesx: Put fwnode in matching case during ->probe()
s390: appldata depends on PROC_SYSCTL
visorbus: fix error return code in visorchipset_init()
fsi/sbefifo: Fix reset timeout
fsi/sbefifo: Clean up correct FIFO when receiving reset request from SBE
fsi: scom: Reset the FSI2PIB engine for any error
fsi: core: Fix return of error values on failures
scsi: FlashPoint: Rename si_flags field
tty: nozomi: Fix the error handling path of 'nozomi_card_init()'
char: pcmcia: error out if 'num_bytes_read' is greater than 4 in set_protocol()
Input: hil_kbd - fix error return code in hil_dev_connect()
ASoC: rsnd: tidyup loop on rsnd_adg_clk_query()
ASoC: hisilicon: fix missing clk_disable_unprepare() on error in hi6210_i2s_startup()
iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()
iio: light: tcs3472: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: light: tcs3414: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: light: isl29125: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: prox: as3935: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: prox: pulsed-light: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: prox: srf08: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: humidity: am2315: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: gyro: bmg160: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: adc: vf610: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: adc: ti-ads1015: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: accel: stk8ba50: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: accel: kxcjk-1013: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: accel: hid: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: accel: bma220: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: accel: bma180: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: adis_buffer: do not return ints in irq handlers
mwifiex: re-fix for unaligned accesses
tty: nozomi: Fix a resource leak in an error handling function
RDMA/mlx5: Don't access NULL-cleared mpi pointer
net: sched: fix warning in tcindex_alloc_perfect_hash
* net: lwtunnel: handle MTU calculation in forwading
include/net/ip.h
include/net/ip6_route.h
net/ipv4/route.c
* writeback: fix obtain a reference to a freeing memcg css
fs/fs-writeback.c
* Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event
net/bluetooth/hci_event.c
* Bluetooth: mgmt: Fix slab-out-of-bounds in tlv_data_is_valid
net/bluetooth/mgmt.c
* ipv6: fix out-of-bound access in ip6_parse_tlv()
net/ipv6/exthdrs.c
ibmvnic: free tx_pool if tso_pool alloc fails
Revert "ibmvnic: remove duplicate napi_schedule call in open function"
i40e: Fix autoneg disabling for non-10GBaseT links
i40e: Fix error handling in i40e_vsi_open
* bpf: Do not change gso_size during bpf_skb_change_proto()
net/core/filter.c
* ipv6: exthdrs: do not blindly use init_net
net/ipv6/exthdrs.c
net: bcmgenet: Fix attaching to PYH failed on RPi 4B
mac80211: remove iwlwifi specific workaround NDPs of null_response
ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl()
ieee802154: hwsim: Fix memory leak in hwsim_add_one
* net/ipv4: swap flow ports when validating source
net/ipv4/fib_frontend.c
vxlan: add missing rcu_read_lock() in neigh_reduce()
pkt_sched: sch_qfq: fix qfq_change_class() error path
net: ethernet: ezchip: fix error handling
net: ethernet: ezchip: fix UAF in nps_enet_remove
net: ethernet: aeroflex: fix UAF in greth_of_remove
samples/bpf: Fix the error return code of xdp_redirect's main()
RDMA/rxe: Fix qp reference counting for atomic ops
netfilter: nft_tproxy: restrict support to TCP and UDP transport protocols
netfilter: nft_osf: check for TCP packet before further processing
netfilter: nft_exthdr: check for IPv6 packet before further processing
RDMA/mlx5: Don't add slave port to unaffiliated list
* netlabel: Fix memory leak in netlbl_mgmt_add_common
net/netlabel/netlabel_mgmt.c
ath10k: Fix an error code in ath10k_add_interface()
brcmsmac: mac80211_if: Fix a resource leak in an error handling path
brcmfmac: correctly report average RSSI in station info
brcmfmac: fix setting of station info chains bitmask
ssb: Fix error return code in ssb_bus_scan()
wcn36xx: Move hal_buf allocation to devm_kmalloc in probe
ieee802154: hwsim: Fix possible memory leak in hwsim_subscribe_all_others
* wireless: carl9170: fix LEDS build errors & warnings
drivers/net/wireless/ath/carl9170/Kconfig
tools/bpftool: Fix error return code in do_batch()
drm: qxl: ensure surf.data is ininitialized
RDMA/rxe: Fix failure during driver load
ehea: fix error return code in ehea_restart_qps()
drm/rockchip: cdn-dp-core: add missing clk_disable_unprepare() on error in cdn_dp_grf_write()
net: pch_gbe: Propagate error from devm_gpio_request_one()
net: mvpp2: Put fwnode in error case during ->probe()
ocfs2: fix snprintf() checking
blk-wbt: make sure throttle is enabled properly
* blk-wbt: introduce a new disable state to prevent false positive by rwb_enabled()
block/blk-wbt.h
ACPI: sysfs: Fix a buffer overrun problem with description_show()
crypto: nx - Fix RCU warning in nx842_OF_upd_status
spi: spi-sun6i: Fix chipselect/clock bug
btrfs: clear log tree recovering status if starting transaction fails
hwmon: (max31790) Fix fan speed reporting for fan7..12
hwmon: (max31722) Remove non-standard ACPI device IDs
media: s5p-g2d: Fix a memory leak on ctx->fh.m2m_ctx
mmc: usdhi6rol0: fix error return code in usdhi6_probe()
media: siano: Fix out-of-bounds warnings in smscore_load_firmware_family2()
media: gspca/gl860: fix zero-length control requests
media: tc358743: Fix error return code in tc358743_probe_of()
media: exynos4-is: Fix a use after free in isp_video_release
pata_ep93xx: fix deferred probing
media: rc: i2c: Fix an error message
crypto: ccp - Fix a resource leak in an error handling path
evm: fix writing <securityfs>/evm overflow
pata_octeon_cf: avoid WARN_ON() in ata_host_activate()
media: I2C: change 'RST' to "RSET" to fix multiple build errors
pata_rb532_cf: fix deferred probing
sata_highbank: fix deferred probing
crypto: ux500 - Fix error return code in hash_hw_final()
crypto: ixp4xx - dma_unmap the correct address
media: s5p_cec: decrement usage count if disabled
ia64: mca_drv: fix incorrect array size calculation
HID: wacom: Correct base usage for capacitive ExpressKey status bits
ACPI: tables: Add custom DSDT file as makefile prerequisite
* clocksource: Retry clock read if long delays detected
kernel/time/clocksource.c
platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard()
ACPI: bus: Call kobject_put() in acpi_init() error path
ACPICA: Fix memory leak caused by _CID repair function
fs: dlm: fix memory leak when fenced
* random32: Fix implicit truncation warning in prandom_seed_state()
include/linux/prandom.h
fs: dlm: cancel work sync othercon
* block_dump: remove block_dump feature in mark_inode_dirty()
fs/fs-writeback.c
ACPI: EC: Make more Asus laptops use ECDT _GPE
* lib: vsprintf: Fix handling of number field widths in vsscanf
lib/kstrtox.c
lib/kstrtox.h
lib/vsprintf.c
hv_utils: Fix passing zero to 'PTR_ERR' warning
ACPI: processor idle: Fix up C-state latency if not ordered
EDAC/ti: Add missing MODULE_DEVICE_TABLE
* HID: do not use down_interruptible() when unbinding devices
drivers/hid/hid-core.c
regulator: da9052: Ensure enough delay time for .set_voltage_time_sel
* btrfs: disable build on platforms having page size 256K
fs/btrfs/Kconfig
btrfs: abort transaction if we fail to update the delayed inode
btrfs: fix error handling in __btrfs_update_delayed_inode
media: imx-csi: Skip first few frames from a BT.656 source
media: siano: fix device register error path
media: dvb_net: avoid speculation from net slot
* crypto: shash - avoid comparing pointers to exported functions under CFI
crypto/shash.c
include/crypto/internal/hash.h
mmc: via-sdmmc: add a check against NULL pointer dereference
media: dvd_usb: memory leak in cinergyt2_fe_attach
media: st-hva: Fix potential NULL pointer dereferences
media: bt8xx: Fix a missing check bug in bt878_probe
* media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release
drivers/media/v4l2-core/v4l2-fh.c
media: em28xx: Fix possible memory leak of em28xx struct
* sched/fair: Fix ascii art by relpacing tabs
kernel/sched/fair.c
crypto: qat - remove unused macro in FW loader
crypto: qat - check return code of qat_hal_rd_rel_reg()
media: pvrusb2: fix warning in pvr2_i2c_core_done
media: cobalt: fix race condition in setting HPD
media: cpia2: fix memory leak in cpia2_usb_probe
crypto: nx - add missing MODULE_DEVICE_TABLE
regulator: uniphier: Add missing MODULE_DEVICE_TABLE
spi: omap-100k: Fix the length judgment problem
spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages()
spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf'
* spi: Make of_register_spi_device also set the fwnode
drivers/spi/spi.c
* fuse: check connected before queueing on fpq->io
fs/fuse/dev.c
evm: Refuse EVM_ALLOW_METADATA_WRITES only if an HMAC key is loaded
evm: Execute evm_inode_init_security() only when an HMAC key is loaded
powerpc/stacktrace: Fix spurious "stale" traces in raise_backtrace_ipi()
* seq_buf: Make trace_seq_putmem_hex() support data longer than 8
lib/seq_buf.c
* tracepoint: Add tracepoint_probe_register_may_exist() for BPF tracing
include/linux/tracepoint.h
kernel/trace/bpf_trace.c
kernel/tracepoint.c
tracing/histograms: Fix parsing of "sym-offset" modifier
rsi: fix AP mode with WPA failure due to encrypted EAPOL
rsi: Assign beacon rate settings to the correct rate_info descriptor field
ssb: sdio: Don't overwrite const buffer if block_write fails
ath9k: Fix kernel NULL pointer dereference during ath_reset_internal()
serial_cs: remove wrong GLOBETROTTER.cis entry
serial_cs: Add Option International GSM-Ready 56K/ISDN modem
serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()
iio: ltr501: ltr501_read_ps(): add missing endianness conversion
iio: ltr501: ltr559: fix initialization of LTR501_ALS_CONTR
iio: ltr501: mark register holding upper 8 bits of ALS_DATA{0,1} and PS_DATA as volatile, too
iio: light: tcs3472: do not free unallocated IRQ
rtc: stm32: Fix unbalanced clk_disable_unprepare() on probe error path
s390/cio: dont call css_wait_for_slow_path() inside a lock
SUNRPC: Should wake up the privileged task firstly.
SUNRPC: Fix the batch tasks count wraparound.
can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path
can: gw: synchronize rcu operations before removing gw job entry
can: bcm: delay release of struct bcm_op after synchronize_rcu()
* ext4: use ext4_grp_locked_error in mb_find_extent
fs/ext4/mballoc.c
* ext4: fix avefreec in find_group_orlov
fs/ext4/ialloc.c
* ext4: remove check for zero nr_to_scan in ext4_es_scan()
fs/ext4/extents_status.c
* ext4: correct the cache_nr in tracepoint ext4_es_shrink_exit
fs/ext4/extents_status.c
* ext4: return error code when ext4_fill_flex_info() fails
fs/ext4/super.c
* ext4: fix kernel infoleak via ext4_extent_header
fs/ext4/extents.c
* ext4: cleanup in-core orphan list if ext4_truncate() failed to get a transaction handle
fs/ext4/super.c
btrfs: clear defrag status of a root if starting transaction fails
btrfs: send: fix invalid path for unlink operations after parent orphanization
ARM: dts: at91: sama5d4: fix pinctrl muxing
arm_pmu: Fix write counter incorrect in ARMv7 big-endian mode
Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl
* iov_iter_fault_in_readable() should do nothing in xarray case
lib/iov_iter.c
ntfs: fix validity check for file name attribute
* xhci: solve a double free problem while doing s4
drivers/usb/host/xhci-mem.c
* usb: typec: Add the missed altmode_id_remove() in typec_register_altmode()
drivers/usb/typec/class.c
* usb: dwc3: Fix debugfs creation flow
drivers/usb/dwc3/core.c
USB: cdc-acm: blacklist Heimann USB Appset device
usb: gadget: eem: fix echo command packet response issue
net: can: ems_usb: fix use-after-free in ems_usb_disconnect()
Input: usbtouchscreen - fix control-request directions
media: dvb-usb: fix wrong definition
* ALSA: usb-audio: Fix OOB access at proc output
sound/usb/mixer.c
* ALSA: usb-audio: fix rate on Ozone Z90 USB headset
sound/usb/format.c
* scsi: core: Retry I/O for Notify (Enable Spinup) Required error
drivers/scsi/scsi_lib.c
* Revert "clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940"
include/linux/cpuhotplug.h
Merge 4.19.197 into android-4.19-stable
Linux 4.19.197
* clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940
include/linux/cpuhotplug.h
clocksource/drivers/timer-ti-dm: Prepare to handle dra7 timer wrap issue
clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support
ARM: OMAP: replace setup_irq() by request_irq()
KVM: SVM: Call SEV Guest Decommission if ASID binding fails
xen/events: reset active flag for lateeoi events later
* kthread: prevent deadlock when kthread_mod_delayed_work() races with kthread_cancel_delayed_work_sync()
kernel/kthread.c
* kthread_worker: split code for canceling the delayed work timer
kernel/kthread.c
ARM: dts: imx6qdl-sabresd: Remove incorrect power supply assignment
KVM: SVM: Periodically schedule when unregistering regions on destroy
* ext4: eliminate bogus error in ext4_data_block_valid_rcu()
fs/ext4/block_validity.c
drm/nouveau: fix dma_address check for CPU/GPU sync
scsi: sr: Return appropriate error code when disk is ejected
* mm, futex: fix shared futex pgoff on shmem huge page
include/linux/hugetlb.h
include/linux/pagemap.h
kernel/futex.c
* mm/thp: another PVMW_SYNC fix in page_vma_mapped_walk()
mm/page_vma_mapped.c
* mm/thp: fix page_vma_mapped_walk() if THP mapped by ptes
mm/page_vma_mapped.c
* mm: page_vma_mapped_walk(): get vma_address_end() earlier
mm/page_vma_mapped.c
* mm: page_vma_mapped_walk(): use goto instead of while (1)
mm/page_vma_mapped.c
* mm: page_vma_mapped_walk(): add a level of indentation
mm/page_vma_mapped.c
* mm: page_vma_mapped_walk(): crossing page table boundary
mm/page_vma_mapped.c
* mm: page_vma_mapped_walk(): prettify PVMW_MIGRATION block
mm/page_vma_mapped.c
* mm: page_vma_mapped_walk(): use pmde for *pvmw->pmd
mm/page_vma_mapped.c
* mm: page_vma_mapped_walk(): settle PageHuge on entry
mm/page_vma_mapped.c
* mm: page_vma_mapped_walk(): use page for pvmw->page
mm/page_vma_mapped.c
mm: thp: replace DEBUG_VM BUG with VM_WARN when unmap fails for split
* mm/thp: unmap_mapping_page() to fix THP truncate_cleanup_page()
include/linux/mm.h
mm/memory.c
mm/truncate.c
* mm/thp: fix page_address_in_vma() on file THP tails
mm/rmap.c
* mm/thp: fix vma_address() if virtual address below file offset
mm/internal.h
mm/page_vma_mapped.c
mm/rmap.c
* mm/thp: try_to_unmap() use TTU_SYNC for safe splitting
include/linux/rmap.h
mm/page_vma_mapped.c
mm/rmap.c
* mm/thp: make is_huge_zero_pmd() safe and quicker
include/linux/huge_mm.h
* mm/thp: fix __split_huge_pmd_locked() on shmem migration entry
mm/pgtable-generic.c
* mm/rmap: use page_not_mapped in try_to_unmap()
mm/rmap.c
* mm/rmap: remove unneeded semicolon in page_not_mapped()
mm/rmap.c
* mm: add VM_WARN_ON_ONCE_PAGE() macro
include/linux/mmdebug.h
Bug: 196282886
Change-Id: I0555a0539a4547b90a2647a24737b194add45248
Signed-off-by: Lucas Wei <lucaswei@google.com>
653 lines
19 KiB
C
653 lines
19 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_PAGEMAP_H
|
|
#define _LINUX_PAGEMAP_H
|
|
|
|
/*
|
|
* Copyright 1995 Linus Torvalds
|
|
*/
|
|
#include <linux/mm.h>
|
|
#include <linux/fs.h>
|
|
#include <linux/list.h>
|
|
#include <linux/highmem.h>
|
|
#include <linux/compiler.h>
|
|
#include <linux/uaccess.h>
|
|
#include <linux/gfp.h>
|
|
#include <linux/bitops.h>
|
|
#include <linux/hardirq.h> /* for in_interrupt() */
|
|
#include <linux/hugetlb_inline.h>
|
|
|
|
struct pagevec;
|
|
|
|
/*
|
|
* Bits in mapping->flags.
|
|
*/
|
|
enum mapping_flags {
|
|
AS_EIO = 0, /* IO error on async write */
|
|
AS_ENOSPC = 1, /* ENOSPC on async write */
|
|
AS_MM_ALL_LOCKS = 2, /* under mm_take_all_locks() */
|
|
AS_UNEVICTABLE = 3, /* e.g., ramdisk, SHM_LOCK */
|
|
AS_EXITING = 4, /* final truncate in progress */
|
|
/* writeback related tags are not used */
|
|
AS_NO_WRITEBACK_TAGS = 5,
|
|
};
|
|
|
|
/**
|
|
* mapping_set_error - record a writeback error in the address_space
|
|
* @mapping - the mapping in which an error should be set
|
|
* @error - the error to set in the mapping
|
|
*
|
|
* When writeback fails in some way, we must record that error so that
|
|
* userspace can be informed when fsync and the like are called. We endeavor
|
|
* to report errors on any file that was open at the time of the error. Some
|
|
* internal callers also need to know when writeback errors have occurred.
|
|
*
|
|
* When a writeback error occurs, most filesystems will want to call
|
|
* mapping_set_error to record the error in the mapping so that it can be
|
|
* reported when the application calls fsync(2).
|
|
*/
|
|
static inline void mapping_set_error(struct address_space *mapping, int error)
|
|
{
|
|
if (likely(!error))
|
|
return;
|
|
|
|
/* Record in wb_err for checkers using errseq_t based tracking */
|
|
filemap_set_wb_err(mapping, error);
|
|
|
|
/* Record it in flags for now, for legacy callers */
|
|
if (error == -ENOSPC)
|
|
set_bit(AS_ENOSPC, &mapping->flags);
|
|
else
|
|
set_bit(AS_EIO, &mapping->flags);
|
|
}
|
|
|
|
static inline void mapping_set_unevictable(struct address_space *mapping)
|
|
{
|
|
set_bit(AS_UNEVICTABLE, &mapping->flags);
|
|
}
|
|
|
|
static inline void mapping_clear_unevictable(struct address_space *mapping)
|
|
{
|
|
clear_bit(AS_UNEVICTABLE, &mapping->flags);
|
|
}
|
|
|
|
static inline int mapping_unevictable(struct address_space *mapping)
|
|
{
|
|
if (mapping)
|
|
return test_bit(AS_UNEVICTABLE, &mapping->flags);
|
|
return !!mapping;
|
|
}
|
|
|
|
static inline void mapping_set_exiting(struct address_space *mapping)
|
|
{
|
|
set_bit(AS_EXITING, &mapping->flags);
|
|
}
|
|
|
|
static inline int mapping_exiting(struct address_space *mapping)
|
|
{
|
|
return test_bit(AS_EXITING, &mapping->flags);
|
|
}
|
|
|
|
static inline void mapping_set_no_writeback_tags(struct address_space *mapping)
|
|
{
|
|
set_bit(AS_NO_WRITEBACK_TAGS, &mapping->flags);
|
|
}
|
|
|
|
static inline int mapping_use_writeback_tags(struct address_space *mapping)
|
|
{
|
|
return !test_bit(AS_NO_WRITEBACK_TAGS, &mapping->flags);
|
|
}
|
|
|
|
static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
|
|
{
|
|
return mapping->gfp_mask;
|
|
}
|
|
|
|
/* Restricts the given gfp_mask to what the mapping allows. */
|
|
static inline gfp_t mapping_gfp_constraint(struct address_space *mapping,
|
|
gfp_t gfp_mask)
|
|
{
|
|
return mapping_gfp_mask(mapping) & gfp_mask;
|
|
}
|
|
|
|
/*
|
|
* This is non-atomic. Only to be used before the mapping is activated.
|
|
* Probably needs a barrier...
|
|
*/
|
|
static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask)
|
|
{
|
|
m->gfp_mask = mask;
|
|
}
|
|
|
|
void release_pages(struct page **pages, int nr);
|
|
|
|
/*
|
|
* speculatively take a reference to a page.
|
|
* If the page is free (_refcount == 0), then _refcount is untouched, and 0
|
|
* is returned. Otherwise, _refcount is incremented by 1 and 1 is returned.
|
|
*
|
|
* This function must be called inside the same rcu_read_lock() section as has
|
|
* been used to lookup the page in the pagecache radix-tree (or page table):
|
|
* this allows allocators to use a synchronize_rcu() to stabilize _refcount.
|
|
*
|
|
* Unless an RCU grace period has passed, the count of all pages coming out
|
|
* of the allocator must be considered unstable. page_count may return higher
|
|
* than expected, and put_page must be able to do the right thing when the
|
|
* page has been finished with, no matter what it is subsequently allocated
|
|
* for (because put_page is what is used here to drop an invalid speculative
|
|
* reference).
|
|
*
|
|
* This is the interesting part of the lockless pagecache (and lockless
|
|
* get_user_pages) locking protocol, where the lookup-side (eg. find_get_page)
|
|
* has the following pattern:
|
|
* 1. find page in radix tree
|
|
* 2. conditionally increment refcount
|
|
* 3. check the page is still in pagecache (if no, goto 1)
|
|
*
|
|
* Remove-side that cares about stability of _refcount (eg. reclaim) has the
|
|
* following (with the i_pages lock held):
|
|
* A. atomically check refcount is correct and set it to 0 (atomic_cmpxchg)
|
|
* B. remove page from pagecache
|
|
* C. free the page
|
|
*
|
|
* There are 2 critical interleavings that matter:
|
|
* - 2 runs before A: in this case, A sees elevated refcount and bails out
|
|
* - A runs before 2: in this case, 2 sees zero refcount and retries;
|
|
* subsequently, B will complete and 1 will find no page, causing the
|
|
* lookup to return NULL.
|
|
*
|
|
* It is possible that between 1 and 2, the page is removed then the exact same
|
|
* page is inserted into the same position in pagecache. That's OK: the
|
|
* old find_get_page using a lock could equally have run before or after
|
|
* such a re-insertion, depending on order that locks are granted.
|
|
*
|
|
* Lookups racing against pagecache insertion isn't a big problem: either 1
|
|
* will find the page or it will not. Likewise, the old find_get_page could run
|
|
* either before the insertion or afterwards, depending on timing.
|
|
*/
|
|
static inline int page_cache_get_speculative(struct page *page)
|
|
{
|
|
#ifdef CONFIG_TINY_RCU
|
|
# ifdef CONFIG_PREEMPT_COUNT
|
|
VM_BUG_ON(!in_atomic() && !irqs_disabled());
|
|
# endif
|
|
/*
|
|
* Preempt must be disabled here - we rely on rcu_read_lock doing
|
|
* this for us.
|
|
*
|
|
* Pagecache won't be truncated from interrupt context, so if we have
|
|
* found a page in the radix tree here, we have pinned its refcount by
|
|
* disabling preempt, and hence no need for the "speculative get" that
|
|
* SMP requires.
|
|
*/
|
|
VM_BUG_ON_PAGE(page_count(page) == 0, page);
|
|
page_ref_inc(page);
|
|
|
|
#else
|
|
if (unlikely(!get_page_unless_zero(page))) {
|
|
/*
|
|
* Either the page has been freed, or will be freed.
|
|
* In either case, retry here and the caller should
|
|
* do the right thing (see comments above).
|
|
*/
|
|
return 0;
|
|
}
|
|
#endif
|
|
VM_BUG_ON_PAGE(PageTail(page), page);
|
|
|
|
return 1;
|
|
}
|
|
|
|
/*
|
|
* Same as above, but add instead of inc (could just be merged)
|
|
*/
|
|
static inline int page_cache_add_speculative(struct page *page, int count)
|
|
{
|
|
VM_BUG_ON(in_interrupt());
|
|
|
|
#if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU)
|
|
# ifdef CONFIG_PREEMPT_COUNT
|
|
VM_BUG_ON(!in_atomic() && !irqs_disabled());
|
|
# endif
|
|
VM_BUG_ON_PAGE(page_count(page) == 0, page);
|
|
page_ref_add(page, count);
|
|
|
|
#else
|
|
if (unlikely(!page_ref_add_unless(page, count, 0)))
|
|
return 0;
|
|
#endif
|
|
VM_BUG_ON_PAGE(PageCompound(page) && page != compound_head(page), page);
|
|
|
|
return 1;
|
|
}
|
|
|
|
#ifdef CONFIG_NUMA
|
|
extern struct page *__page_cache_alloc(gfp_t gfp);
|
|
#else
|
|
static inline struct page *__page_cache_alloc(gfp_t gfp)
|
|
{
|
|
return alloc_pages(gfp, 0);
|
|
}
|
|
#endif
|
|
|
|
static inline struct page *page_cache_alloc(struct address_space *x)
|
|
{
|
|
return __page_cache_alloc(mapping_gfp_mask(x));
|
|
}
|
|
|
|
static inline gfp_t readahead_gfp_mask(struct address_space *x)
|
|
{
|
|
return mapping_gfp_mask(x) | __GFP_NORETRY | __GFP_NOWARN;
|
|
}
|
|
|
|
typedef int filler_t(void *, struct page *);
|
|
|
|
pgoff_t page_cache_next_hole(struct address_space *mapping,
|
|
pgoff_t index, unsigned long max_scan);
|
|
pgoff_t page_cache_prev_hole(struct address_space *mapping,
|
|
pgoff_t index, unsigned long max_scan);
|
|
|
|
#define FGP_ACCESSED 0x00000001
|
|
#define FGP_LOCK 0x00000002
|
|
#define FGP_CREAT 0x00000004
|
|
#define FGP_WRITE 0x00000008
|
|
#define FGP_NOFS 0x00000010
|
|
#define FGP_NOWAIT 0x00000020
|
|
#define FGP_FOR_MMAP 0x00000040
|
|
|
|
struct page *pagecache_get_page(struct address_space *mapping, pgoff_t offset,
|
|
int fgp_flags, gfp_t cache_gfp_mask);
|
|
|
|
/**
|
|
* find_get_page - find and get a page reference
|
|
* @mapping: the address_space to search
|
|
* @offset: the page index
|
|
*
|
|
* Looks up the page cache slot at @mapping & @offset. If there is a
|
|
* page cache page, it is returned with an increased refcount.
|
|
*
|
|
* Otherwise, %NULL is returned.
|
|
*/
|
|
static inline struct page *find_get_page(struct address_space *mapping,
|
|
pgoff_t offset)
|
|
{
|
|
return pagecache_get_page(mapping, offset, 0, 0);
|
|
}
|
|
|
|
static inline struct page *find_get_page_flags(struct address_space *mapping,
|
|
pgoff_t offset, int fgp_flags)
|
|
{
|
|
return pagecache_get_page(mapping, offset, fgp_flags, 0);
|
|
}
|
|
|
|
/**
|
|
* find_lock_page - locate, pin and lock a pagecache page
|
|
* @mapping: the address_space to search
|
|
* @offset: the page index
|
|
*
|
|
* Looks up the page cache slot at @mapping & @offset. If there is a
|
|
* page cache page, it is returned locked and with an increased
|
|
* refcount.
|
|
*
|
|
* Otherwise, %NULL is returned.
|
|
*
|
|
* find_lock_page() may sleep.
|
|
*/
|
|
static inline struct page *find_lock_page(struct address_space *mapping,
|
|
pgoff_t offset)
|
|
{
|
|
return pagecache_get_page(mapping, offset, FGP_LOCK, 0);
|
|
}
|
|
|
|
/**
|
|
* find_or_create_page - locate or add a pagecache page
|
|
* @mapping: the page's address_space
|
|
* @index: the page's index into the mapping
|
|
* @gfp_mask: page allocation mode
|
|
*
|
|
* Looks up the page cache slot at @mapping & @offset. If there is a
|
|
* page cache page, it is returned locked and with an increased
|
|
* refcount.
|
|
*
|
|
* If the page is not present, a new page is allocated using @gfp_mask
|
|
* and added to the page cache and the VM's LRU list. The page is
|
|
* returned locked and with an increased refcount.
|
|
*
|
|
* On memory exhaustion, %NULL is returned.
|
|
*
|
|
* find_or_create_page() may sleep, even if @gfp_flags specifies an
|
|
* atomic allocation!
|
|
*/
|
|
static inline struct page *find_or_create_page(struct address_space *mapping,
|
|
pgoff_t offset, gfp_t gfp_mask)
|
|
{
|
|
return pagecache_get_page(mapping, offset,
|
|
FGP_LOCK|FGP_ACCESSED|FGP_CREAT,
|
|
gfp_mask);
|
|
}
|
|
|
|
/**
|
|
* grab_cache_page_nowait - returns locked page at given index in given cache
|
|
* @mapping: target address_space
|
|
* @index: the page index
|
|
*
|
|
* Same as grab_cache_page(), but do not wait if the page is unavailable.
|
|
* This is intended for speculative data generators, where the data can
|
|
* be regenerated if the page couldn't be grabbed. This routine should
|
|
* be safe to call while holding the lock for another page.
|
|
*
|
|
* Clear __GFP_FS when allocating the page to avoid recursion into the fs
|
|
* and deadlock against the caller's locked page.
|
|
*/
|
|
static inline struct page *grab_cache_page_nowait(struct address_space *mapping,
|
|
pgoff_t index)
|
|
{
|
|
return pagecache_get_page(mapping, index,
|
|
FGP_LOCK|FGP_CREAT|FGP_NOFS|FGP_NOWAIT,
|
|
mapping_gfp_mask(mapping));
|
|
}
|
|
|
|
struct page *find_get_entry(struct address_space *mapping, pgoff_t offset);
|
|
struct page *find_lock_entry(struct address_space *mapping, pgoff_t offset);
|
|
unsigned find_get_entries(struct address_space *mapping, pgoff_t start,
|
|
unsigned int nr_entries, struct page **entries,
|
|
pgoff_t *indices);
|
|
unsigned find_get_pages_range(struct address_space *mapping, pgoff_t *start,
|
|
pgoff_t end, unsigned int nr_pages,
|
|
struct page **pages);
|
|
static inline unsigned find_get_pages(struct address_space *mapping,
|
|
pgoff_t *start, unsigned int nr_pages,
|
|
struct page **pages)
|
|
{
|
|
return find_get_pages_range(mapping, start, (pgoff_t)-1, nr_pages,
|
|
pages);
|
|
}
|
|
unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start,
|
|
unsigned int nr_pages, struct page **pages);
|
|
unsigned find_get_pages_range_tag(struct address_space *mapping, pgoff_t *index,
|
|
pgoff_t end, int tag, unsigned int nr_pages,
|
|
struct page **pages);
|
|
static inline unsigned find_get_pages_tag(struct address_space *mapping,
|
|
pgoff_t *index, int tag, unsigned int nr_pages,
|
|
struct page **pages)
|
|
{
|
|
return find_get_pages_range_tag(mapping, index, (pgoff_t)-1, tag,
|
|
nr_pages, pages);
|
|
}
|
|
unsigned find_get_entries_tag(struct address_space *mapping, pgoff_t start,
|
|
int tag, unsigned int nr_entries,
|
|
struct page **entries, pgoff_t *indices);
|
|
|
|
struct page *grab_cache_page_write_begin(struct address_space *mapping,
|
|
pgoff_t index, unsigned flags);
|
|
|
|
/*
|
|
* Returns locked page at given index in given cache, creating it if needed.
|
|
*/
|
|
static inline struct page *grab_cache_page(struct address_space *mapping,
|
|
pgoff_t index)
|
|
{
|
|
return find_or_create_page(mapping, index, mapping_gfp_mask(mapping));
|
|
}
|
|
|
|
extern struct page * read_cache_page(struct address_space *mapping,
|
|
pgoff_t index, filler_t *filler, void *data);
|
|
extern struct page * read_cache_page_gfp(struct address_space *mapping,
|
|
pgoff_t index, gfp_t gfp_mask);
|
|
extern int read_cache_pages(struct address_space *mapping,
|
|
struct list_head *pages, filler_t *filler, void *data);
|
|
|
|
static inline struct page *read_mapping_page(struct address_space *mapping,
|
|
pgoff_t index, void *data)
|
|
{
|
|
return read_cache_page(mapping, index, NULL, data);
|
|
}
|
|
|
|
/*
|
|
* Get index of the page within radix-tree (but not for hugetlb pages).
|
|
* (TODO: remove once hugetlb pages will have ->index in PAGE_SIZE)
|
|
*/
|
|
static inline pgoff_t page_to_index(struct page *page)
|
|
{
|
|
pgoff_t pgoff;
|
|
|
|
if (likely(!PageTransTail(page)))
|
|
return page->index;
|
|
|
|
/*
|
|
* We don't initialize ->index for tail pages: calculate based on
|
|
* head page
|
|
*/
|
|
pgoff = compound_head(page)->index;
|
|
pgoff += page - compound_head(page);
|
|
return pgoff;
|
|
}
|
|
|
|
extern pgoff_t hugetlb_basepage_index(struct page *page);
|
|
|
|
/*
|
|
* Get the offset in PAGE_SIZE (even for hugetlb pages).
|
|
* (TODO: hugetlb pages should have ->index in PAGE_SIZE)
|
|
*/
|
|
static inline pgoff_t page_to_pgoff(struct page *page)
|
|
{
|
|
if (unlikely(PageHuge(page)))
|
|
return hugetlb_basepage_index(page);
|
|
return page_to_index(page);
|
|
}
|
|
|
|
/*
|
|
* Return byte-offset into filesystem object for page.
|
|
*/
|
|
static inline loff_t page_offset(struct page *page)
|
|
{
|
|
return ((loff_t)page->index) << PAGE_SHIFT;
|
|
}
|
|
|
|
static inline loff_t page_file_offset(struct page *page)
|
|
{
|
|
return ((loff_t)page_index(page)) << PAGE_SHIFT;
|
|
}
|
|
|
|
extern pgoff_t linear_hugepage_index(struct vm_area_struct *vma,
|
|
unsigned long address);
|
|
|
|
static inline pgoff_t linear_page_index(struct vm_area_struct *vma,
|
|
unsigned long address)
|
|
{
|
|
pgoff_t pgoff;
|
|
if (unlikely(is_vm_hugetlb_page(vma)))
|
|
return linear_hugepage_index(vma, address);
|
|
pgoff = (address - vma->vm_start) >> PAGE_SHIFT;
|
|
pgoff += vma->vm_pgoff;
|
|
return pgoff;
|
|
}
|
|
|
|
extern void __sched __lock_page(struct page *page);
|
|
extern int __sched __lock_page_killable(struct page *page);
|
|
extern int __sched __lock_page_or_retry(struct page *page, struct mm_struct *mm,
|
|
unsigned int flags);
|
|
extern void unlock_page(struct page *page);
|
|
|
|
static inline int trylock_page(struct page *page)
|
|
{
|
|
page = compound_head(page);
|
|
return (likely(!test_and_set_bit_lock(PG_locked, &page->flags)));
|
|
}
|
|
|
|
/*
|
|
* lock_page may only be called if we have the page's inode pinned.
|
|
*/
|
|
static inline __sched void lock_page(struct page *page)
|
|
{
|
|
might_sleep();
|
|
if (!trylock_page(page))
|
|
__lock_page(page);
|
|
}
|
|
|
|
/*
|
|
* lock_page_killable is like lock_page but can be interrupted by fatal
|
|
* signals. It returns 0 if it locked the page and -EINTR if it was
|
|
* killed while waiting.
|
|
*/
|
|
static inline __sched int lock_page_killable(struct page *page)
|
|
{
|
|
might_sleep();
|
|
if (!trylock_page(page))
|
|
return __lock_page_killable(page);
|
|
return 0;
|
|
}
|
|
|
|
/*
|
|
* lock_page_or_retry - Lock the page, unless this would block and the
|
|
* caller indicated that it can handle a retry.
|
|
*
|
|
* Return value and mmap_sem implications depend on flags; see
|
|
* __lock_page_or_retry().
|
|
*/
|
|
static inline __sched int lock_page_or_retry(struct page *page,
|
|
struct mm_struct *mm,
|
|
unsigned int flags)
|
|
{
|
|
might_sleep();
|
|
return trylock_page(page) || __lock_page_or_retry(page, mm, flags);
|
|
}
|
|
|
|
/*
|
|
* This is exported only for wait_on_page_locked/wait_on_page_writeback, etc.,
|
|
* and should not be used directly.
|
|
*/
|
|
extern void __sched wait_on_page_bit(struct page *page, int bit_nr);
|
|
extern int __sched wait_on_page_bit_killable(struct page *page, int bit_nr);
|
|
|
|
/*
|
|
* Wait for a page to be unlocked.
|
|
*
|
|
* This must be called with the caller "holding" the page,
|
|
* ie with increased "page->count" so that the page won't
|
|
* go away during the wait..
|
|
*/
|
|
static inline __sched void wait_on_page_locked(struct page *page)
|
|
{
|
|
if (PageLocked(page))
|
|
wait_on_page_bit(compound_head(page), PG_locked);
|
|
}
|
|
|
|
static inline __sched int wait_on_page_locked_killable(struct page *page)
|
|
{
|
|
if (!PageLocked(page))
|
|
return 0;
|
|
return wait_on_page_bit_killable(compound_head(page), PG_locked);
|
|
}
|
|
|
|
extern void put_and_wait_on_page_locked(struct page *page);
|
|
|
|
/*
|
|
* Wait for a page to complete writeback
|
|
*/
|
|
static inline __sched void wait_on_page_writeback(struct page *page)
|
|
{
|
|
if (PageWriteback(page))
|
|
wait_on_page_bit(page, PG_writeback);
|
|
}
|
|
|
|
extern void end_page_writeback(struct page *page);
|
|
void wait_for_stable_page(struct page *page);
|
|
|
|
void page_endio(struct page *page, bool is_write, int err);
|
|
|
|
/*
|
|
* Add an arbitrary waiter to a page's wait queue
|
|
*/
|
|
extern void add_page_wait_queue(struct page *page, wait_queue_entry_t *waiter);
|
|
|
|
/*
|
|
* Fault everything in given userspace address range in.
|
|
*/
|
|
static inline int fault_in_pages_writeable(char __user *uaddr, int size)
|
|
{
|
|
char __user *end = uaddr + size - 1;
|
|
|
|
if (unlikely(size == 0))
|
|
return 0;
|
|
|
|
if (unlikely(uaddr > end))
|
|
return -EFAULT;
|
|
/*
|
|
* Writing zeroes into userspace here is OK, because we know that if
|
|
* the zero gets there, we'll be overwriting it.
|
|
*/
|
|
do {
|
|
if (unlikely(__put_user(0, uaddr) != 0))
|
|
return -EFAULT;
|
|
uaddr += PAGE_SIZE;
|
|
} while (uaddr <= end);
|
|
|
|
/* Check whether the range spilled into the next page. */
|
|
if (((unsigned long)uaddr & PAGE_MASK) ==
|
|
((unsigned long)end & PAGE_MASK))
|
|
return __put_user(0, end);
|
|
|
|
return 0;
|
|
}
|
|
|
|
static inline int fault_in_pages_readable(const char __user *uaddr, int size)
|
|
{
|
|
volatile char c;
|
|
const char __user *end = uaddr + size - 1;
|
|
|
|
if (unlikely(size == 0))
|
|
return 0;
|
|
|
|
if (unlikely(uaddr > end))
|
|
return -EFAULT;
|
|
|
|
do {
|
|
if (unlikely(__get_user(c, uaddr) != 0))
|
|
return -EFAULT;
|
|
uaddr += PAGE_SIZE;
|
|
} while (uaddr <= end);
|
|
|
|
/* Check whether the range spilled into the next page. */
|
|
if (((unsigned long)uaddr & PAGE_MASK) ==
|
|
((unsigned long)end & PAGE_MASK)) {
|
|
return __get_user(c, end);
|
|
}
|
|
|
|
(void)c;
|
|
return 0;
|
|
}
|
|
|
|
int add_to_page_cache_locked(struct page *page, struct address_space *mapping,
|
|
pgoff_t index, gfp_t gfp_mask);
|
|
int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
|
|
pgoff_t index, gfp_t gfp_mask);
|
|
extern void delete_from_page_cache(struct page *page);
|
|
extern void __delete_from_page_cache(struct page *page, void *shadow);
|
|
int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask);
|
|
void delete_from_page_cache_batch(struct address_space *mapping,
|
|
struct pagevec *pvec);
|
|
|
|
/*
|
|
* Like add_to_page_cache_locked, but used to add newly allocated pages:
|
|
* the page is new, so we can just run __SetPageLocked() against it.
|
|
*/
|
|
static inline int add_to_page_cache(struct page *page,
|
|
struct address_space *mapping, pgoff_t offset, gfp_t gfp_mask)
|
|
{
|
|
int error;
|
|
|
|
__SetPageLocked(page);
|
|
error = add_to_page_cache_locked(page, mapping, offset, gfp_mask);
|
|
if (unlikely(error))
|
|
__ClearPageLocked(page);
|
|
return error;
|
|
}
|
|
|
|
static inline unsigned long dir_pages(struct inode *inode)
|
|
{
|
|
return (unsigned long)(inode->i_size + PAGE_SIZE - 1) >>
|
|
PAGE_SHIFT;
|
|
}
|
|
|
|
#endif /* _LINUX_PAGEMAP_H */
|