* msm-4.4/tmp-510d0a3f:
Linux 4.4.11
nf_conntrack: avoid kernel pointer value leak in slab name
drm/radeon: fix DP link training issue with second 4K monitor
drm/i915/bdw: Add missing delay during L3 SQC credit programming
drm/i915: Bail out of pipe config compute loop on LPT
drm/radeon: fix PLL sharing on DCE6.1 (v2)
Revert "[media] videobuf2-v4l2: Verify planes array in buffer dequeueing"
Input: max8997-haptic - fix NULL pointer dereference
get_rock_ridge_filename(): handle malformed NM entries
tools lib traceevent: Do not reassign parg after collapse_tree()
qla1280: Don't allocate 512kb of host tags
atomic_open(): fix the handling of create_error
regulator: axp20x: Fix axp22x ldo_io voltage ranges
regulator: s2mps11: Fix invalid selector mask and voltages for buck9
workqueue: fix rebind bound workers warning
ARM: dts: at91: sam9x5: Fix the memory range assigned to the PMC
vfs: rename: check backing inode being equal
vfs: add vfs_select_inode() helper
perf/core: Disable the event on a truncated AUX record
regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case
pinctrl: at91-pio4: fix pull-up/down logic
spi: spi-ti-qspi: Handle truncated frames properly
spi: spi-ti-qspi: Fix FLEN and WLEN settings if bits_per_word is overridden
spi: pxa2xx: Do not detect number of enabled chip selects on Intel SPT
ALSA: hda - Fix broken reconfig
ALSA: hda - Fix white noise on Asus UX501VW headset
ALSA: hda - Fix subwoofer pin on ASUS N751 and N551
ALSA: usb-audio: Yet another Phoneix Audio device quirk
ALSA: usb-audio: Quirk for yet another Phoenix Audio devices (v2)
crypto: testmgr - Use kmalloc memory for RSA input
crypto: hash - Fix page length clamping in hash walk
crypto: qat - fix invalid pf2vf_resp_wq logic
s390/mm: fix asce_bits handling with dynamic pagetable levels
zsmalloc: fix zs_can_compact() integer overflow
ocfs2: fix posix_acl_create deadlock
ocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang
net/route: enforce hoplimit max value
tcp: refresh skb timestamp at retransmit time
net: thunderx: avoid exposing kernel stack
net: fix a kernel infoleak in x25 module
uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h MIME-Version: 1.0
bridge: fix igmp / mld query parsing
net: bridge: fix old ioctl unlocked net device walk
VSOCK: do not disconnect socket when peer has shutdown SEND only
net/mlx4_en: Fix endianness bug in IPV6 csum calculation
net: fix infoleak in rtnetlink
net: fix infoleak in llc
net: fec: only clear a queue's work bit if the queue was emptied
netem: Segment GSO packets on enqueue
sch_dsmark: update backlog as well
sch_htb: update backlog as well
net_sched: update hierarchical backlog too
net_sched: introduce qdisc_replace() helper
gre: do not pull header in ICMP error processing
net: Implement net_dbg_ratelimited() for CONFIG_DYNAMIC_DEBUG case
samples/bpf: fix trace_output example
bpf: fix check_map_func_compatibility logic
bpf: fix refcnt overflow
bpf: fix double-fdput in replace_map_fd_with_map_ptr()
net/mlx4_en: fix spurious timestamping callbacks
ipv4/fib: don't warn when primary address is missing if in_dev is dead
net/mlx5e: Fix minimum MTU
net/mlx5e: Device's mtu field is u16 and not int
openvswitch: use flow protocol when recalculating ipv6 checksums
atl2: Disable unimplemented scatter/gather feature
vlan: pull on __vlan_insert_tag error path and fix csum correction
net: use skb_postpush_rcsum instead of own implementations
cdc_mbim: apply "NDP to end" quirk to all Huawei devices
bpf/verifier: reject invalid LD_ABS | BPF_DW instruction
net: sched: do not requeue a NULL skb
packet: fix heap info leak in PACKET_DIAG_MCLIST sock_diag interface
route: do not cache fib route info on local routes with oif
decnet: Do not build routes to devices without decnet private data.
parisc: Use generic extable search and sort routines
arm64: kasan: Use actual memory node when populating the kernel image shadow
arm64: mm: treat memstart_addr as a signed quantity
arm64: lse: deal with clobbered IP registers after branch via PLT
arm64: mm: check at build time that PAGE_OFFSET divides the VA space evenly
arm64: kasan: Fix zero shadow mapping overriding kernel image shadow
arm64: consistently use p?d_set_huge
arm64: fix KASLR boot-time I-cache maintenance
arm64: hugetlb: partial revert of 66b3923a1a0f
arm64: make irq_stack_ptr more robust
arm64: efi: invoke EFI_RNG_PROTOCOL to supply KASLR randomness
efi: stub: use high allocation for converted command line
efi: stub: add implementation of efi_random_alloc()
efi: stub: implement efi_get_random_bytes() based on EFI_RNG_PROTOCOL
arm64: kaslr: randomize the linear region
arm64: add support for kernel ASLR
arm64: add support for building vmlinux as a relocatable PIE binary
arm64: switch to relative exception tables
extable: add support for relative extables to search and sort routines
scripts/sortextable: add support for ET_DYN binaries
arm64: futex.h: Add missing PAN toggling
arm64: make asm/elf.h available to asm files
arm64: avoid dynamic relocations in early boot code
arm64: avoid R_AARCH64_ABS64 relocations for Image header fields
arm64: add support for module PLTs
arm64: move brk immediate argument definitions to separate header
arm64: mm: use bit ops rather than arithmetic in pa/va translations
arm64: mm: only perform memstart_addr sanity check if DEBUG_VM
arm64: User die() instead of panic() in do_page_fault()
arm64: allow kernel Image to be loaded anywhere in physical memory
arm64: defer __va translation of initrd_start and initrd_end
arm64: move kernel image to base of vmalloc area
arm64: kvm: deal with kernel symbols outside of linear mapping
arm64: decouple early fixmap init from linear mapping
arm64: pgtable: implement static [pte|pmd|pud]_offset variants
arm64: introduce KIMAGE_VADDR as the virtual base of the kernel region
arm64: add support for ioremap() block mappings
arm64: prevent potential circular header dependencies in asm/bug.h
of/fdt: factor out assignment of initrd_start/initrd_end
of/fdt: make memblock minimum physical address arch configurable
arm64: Remove the get_thread_info() function
arm64: kernel: Don't toggle PAN on systems with UAO
arm64: cpufeature: Test 'matches' pointer to find the end of the list
arm64: kernel: Add support for User Access Override
arm64: add ARMv8.2 id_aa64mmfr2 boiler plate
arm64: cpufeature: Change read_cpuid() to use sysreg's mrs_s macro
arm64: use local label prefixes for __reg_num symbols
arm64: vdso: Mark vDSO code as read-only
arm64: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL
arm64: ptdump: Indicate whether memory should be faulting
arm64: Add support for ARCH_SUPPORTS_DEBUG_PAGEALLOC
arm64: Drop alloc function from create_mapping
arm64: prefetch: add missing #include for spin_lock_prefetch
arm64: lib: patch in prfm for copy_page if requested
arm64: lib: improve copy_page to deal with 128 bytes at a time
arm64: prefetch: add alternative pattern for CPUs without a prefetcher
arm64: prefetch: don't provide spin_lock_prefetch with LSE
arm64: allow vmalloc regions to be set with set_memory_*
arm64: kernel: implement ACPI parking protocol
arm64: mm: create new fine-grained mappings at boot
arm64: ensure _stext and _etext are page-aligned
arm64: mm: allow passing a pgdir to alloc_init_*
arm64: mm: allocate pagetables anywhere
arm64: mm: use fixmap when creating page tables
arm64: mm: add functions to walk tables in fixmap
arm64: mm: add __{pud,pgd}_populate
arm64: mm: avoid redundant __pa(__va(x))
arm64: mm: add functions to walk page tables by PA
arm64: mm: move pte_* macros
arm64: kasan: avoid TLB conflicts
arm64: mm: add code to safely replace TTBR1_EL1
arm64: add function to install the idmap
arm64: unmap idmap earlier
arm64: unify idmap removal
arm64: mm: place empty_zero_page in bss
arm64: mm: specialise pagetable allocators
asm-generic: Fix local variable shadow in __set_fixmap_offset
Eliminate the .eh_frame sections from the aarch64 vmlinux and kernel modules
arm64: Fix an enum typo in mm/dump.c
arm64: kasan: ensure that the KASAN zero page is mapped read-only
arch/arm64/include/asm/pgtable.h: add pmd_mkclean for THP
arm64: hide __efistub_ aliases from kallsyms
Linux 4.4.10
drm/i915/skl: Fix DMC load on Skylake J0 and K0
lib/test-string_helpers.c: fix and improve string_get_size() tests
ACPI / processor: Request native thermal interrupt handling via _OSC
drm/i915: Fake HDMI live status
drm/i915: Make RPS EI/thresholds multiple of 25 on SNB-BDW
drm/i915: Fix eDP low vswing for Broadwell
drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume
drm/radeon: make sure vertical front porch is at least 1
iio: ak8975: fix maybe-uninitialized warning
iio: ak8975: Fix NULL pointer exception on early interrupt
drm/amdgpu: set metadata pointer to NULL after freeing.
drm/amdgpu: make sure vertical front porch is at least 1
gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading
nvmem: mxs-ocotp: fix buffer overflow in read
USB: serial: cp210x: add Straizona Focusers device ids
USB: serial: cp210x: add ID for Link ECU
ata: ahci-platform: Add ports-implemented DT bindings.
libahci: save port map for forced port map
powerpc: Fix bad inline asm constraint in create_zero_mask()
ACPICA: Dispatcher: Update thread ID for recursive method calls
x86/sysfb_efi: Fix valid BAR address range check
ARC: Add missing io barriers to io{read,write}{16,32}be()
ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value
propogate_mnt: Handle the first propogated copy being a slave
fs/pnode.c: treat zero mnt_group_id-s as unequal
x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO
MAINTAINERS: Remove asterisk from EFI directory names
writeback: Fix performance regression in wb_over_bg_thresh()
batman-adv: Reduce refcnt of removed router when updating route
batman-adv: Fix broadcast/ogm queue limit on a removed interface
batman-adv: Check skb size before using encapsulated ETH+VLAN header
batman-adv: fix DAT candidate selection (must use vid)
mm: update min_free_kbytes from khugepaged after core initialization
proc: prevent accessing /proc/<PID>/environ until it's ready
Input: zforce_ts - fix dual touch recognition
HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk
HID: wacom: Add support for DTK-1651
xen/evtchn: fix ring resize when binding new events
xen/balloon: Fix crash when ballooning on x86 32 bit PAE
xen: Fix page <-> pfn conversion on 32 bit systems
ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel
ARM: EXYNOS: Properly skip unitialized parent clock in power domain on
mm/zswap: provide unique zpool name
mm, cma: prevent nr_isolated_* counters from going negative
Minimal fix-up of bad hashing behavior of hash_64()
MD: make bio mergeable
tracing: Don't display trigger file for events that can't be enabled
mac80211: fix statistics leak if dev_alloc_name() fails
ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation
lpfc: fix misleading indentation
clk: qcom: msm8960: Fix ce3_src register offset
clk: versatile: sp810: support reentrance
clk: qcom: msm8960: fix ce3_core clk enable register
clk: meson: Fix meson_clk_register_clks() signature type mismatch
clk: rockchip: free memory in error cases when registering clock branches
soc: rockchip: power-domain: fix err handle while probing
clk-divider: make sure read-only dividers do not write to their register
CNS3xxx: Fix PCI cns3xxx_write_config()
mwifiex: fix corner case association failure
ata: ahci_xgene: dereferencing uninitialized pointer in probe
nbd: ratelimit error msgs after socket close
mfd: intel-lpss: Remove clock tree on error path
ipvs: drop first packet to redirect conntrack
ipvs: correct initial offset of Call-ID header search in SIP persistence engine
ipvs: handle ip_vs_fill_iph_skb_off failure
RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips
Revert: "powerpc/tm: Check for already reclaimed tasks"
arm64: head.S: use memset to clear BSS
efi: stub: define DISABLE_BRANCH_PROFILING for all architectures
arm64: entry: remove pointless SPSR mode check
arm64: mm: move pgd_cache initialisation to pgtable_cache_init
arm64: module: avoid undefined shift behavior in reloc_data()
arm64: module: fix relocation of movz instruction with negative immediate
arm64: traps: address fallout from printk -> pr_* conversion
arm64: ftrace: fix a stack tracer's output under function graph tracer
arm64: pass a task parameter to unwind_frame()
arm64: ftrace: modify a stack frame in a safe way
arm64: remove irq_count and do_softirq_own_stack()
arm64: hugetlb: add support for PTE contiguous bit
arm64: Use PoU cache instr for I/D coherency
arm64: Defer dcache flush in __cpu_copy_user_page
arm64: reduce stack use in irq_handler
arm64: Documentation: add list of software workarounds for errata
arm64: mm: place __cpu_setup in .text
arm64: cmpxchg: Don't incldue linux/mmdebug.h
arm64: mm: fold alternatives into .init
arm64: Remove redundant padding from linker script
arm64: mm: remove pointless PAGE_MASKing
arm64: don't call C code with el0's fp register
arm64: when walking onto the task stack, check sp & fp are in current->stack
arm64: Add this_cpu_ptr() assembler macro for use in entry.S
arm64: irq: fix walking from irq stack to task stack
arm64: Add do_softirq_own_stack() and enable irq_stacks
arm64: Modify stack trace and dump for use with irq_stack
arm64: Store struct thread_info in sp_el0
arm64: Add trace_hardirqs_off annotation in ret_to_user
arm64: ftrace: fix the comments for ftrace_modify_code
arm64: ftrace: stop using kstop_machine to enable/disable tracing
arm64: spinlock: serialise spin_unlock_wait against concurrent lockers
arm64: enable HAVE_IRQ_TIME_ACCOUNTING
arm64: fix COMPAT_SHMLBA definition for large pages
arm64: add __init/__initdata section marker to some functions/variables
arm64: pgtable: implement pte_accessible()
arm64: mm: allow sections for unaligned bases
arm64: mm: detect bad __create_mapping uses
Linux 4.4.9
extcon: max77843: Use correct size for reading the interrupt register
stm class: Select CONFIG_SRCU
megaraid_sas: add missing curly braces in ioctl handler
sunrpc/cache: drop reference when sunrpc_cache_pipe_upcall() detects a race
thermal: rockchip: fix a impossible condition caused by the warning
unbreak allmodconfig KCONFIG_ALLCONFIG=...
jme: Fix device PM wakeup API usage
jme: Do not enable NIC WoL functions on S0
bus: imx-weim: Take the 'status' property value into account
ARM: dts: pxa: fix dma engine node to pxa3xx-nand
ARM: dts: armada-375: use armada-370-sata for SATA
ARM: EXYNOS: select THERMAL_OF
ARM: prima2: always enable reset controller
ARM: OMAP3: Add cpuidle parameters table for omap3430
ext4: fix races of writeback with punch hole and zero range
ext4: fix races between buffered IO and collapse / insert range
ext4: move unlocked dio protection from ext4_alloc_file_blocks()
ext4: fix races between page faults and hole punching
perf stat: Document --detailed option
perf tools: handle spaces in file names obtained from /proc/pid/maps
perf hists browser: Only offer symbol scripting when a symbol is under the cursor
mtd: nand: Drop mtd.owner requirement in nand_scan
mtd: brcmnand: Fix v7.1 register offsets
mtd: spi-nor: remove micron_quad_enable()
serial: sh-sci: Remove cpufreq notifier to fix crash/deadlock
ext4: fix NULL pointer dereference in ext4_mark_inode_dirty()
x86/mm/kmmio: Fix mmiotrace for hugepages
perf evlist: Reference count the cpu and thread maps at set_maps()
drivers/misc/ad525x_dpot: AD5274 fix RDAC read back errors
rtc: max77686: Properly handle regmap_irq_get_virq() error code
rtc: rx8025: remove rv8803 id
rtc: ds1685: passing bogus values to irq_restore
rtc: vr41xx: Wire up alarm_irq_enable
rtc: hym8563: fix invalid year calculation
PM / Domains: Fix removal of a subdomain
PM / OPP: Initialize u_volt_min/max to a valid value
misc: mic/scif: fix wrap around tests
misc/bmp085: Enable building as a module
lib/mpi: Endianness fix
fbdev: da8xx-fb: fix videomodes of lcd panels
scsi_dh: force modular build if SCSI is a module
paride: make 'verbose' parameter an 'int' again
regulator: s5m8767: fix get_register() error handling
irqchip/mxs: Fix error check of of_io_request_and_map()
irqchip/sunxi-nmi: Fix error check of of_io_request_and_map()
spi/rockchip: Make sure spi clk is on in rockchip_spi_set_cs
locking/mcs: Fix mcs_spin_lock() ordering
regulator: core: Fix nested locking of supplies
regulator: core: Ensure we lock all regulators
regulator: core: fix regulator_lock_supply regression
Revert "regulator: core: Fix nested locking of supplies"
videobuf2-v4l2: Verify planes array in buffer dequeueing
videobuf2-core: Check user space planes array in dqbuf
USB: usbip: fix potential out-of-bounds write
cgroup: make sure a parent css isn't freed before its children
mm/hwpoison: fix wrong num_poisoned_pages accounting
mm: vmscan: reclaim highmem zone if buffer_heads is over limit
numa: fix /proc/<pid>/numa_maps for THP
mm/huge_memory: replace VM_NO_THP VM_BUG_ON with actual VMA check
memcg: relocate charge moving from ->attach to ->post_attach
cgroup, cpuset: replace cpuset_post_attach_flush() with cgroup_subsys->post_attach callback
slub: clean up code for kmem cgroup support to kmem_cache_free_bulk
workqueue: fix ghost PENDING flag while doing MQ IO
x86/apic: Handle zero vector gracefully in clear_vector_irq()
efi: Expose non-blocking set_variable() wrapper to efivars
efi: Fix out-of-bounds read in variable_matches()
IB/security: Restrict use of the write() interface
IB/mlx5: Expose correct max_sge_rd limit
cxl: Keep IRQ mappings on context teardown
v4l2-dv-timings.h: fix polarity for 4k formats
vb2-memops: Fix over allocation of frame vectors
ASoC: rt5640: Correct the digital interface data select
ASoC: dapm: Make sure we have a card when displaying component widgets
ASoC: ssm4567: Reset device before regcache_sync()
ASoC: s3c24xx: use const snd_soc_component_driver pointer
EDAC: i7core, sb_edac: Don't return NOTIFY_BAD from mce_decoder callback
toshiba_acpi: Fix regression caused by hotkey enabling value
i2c: exynos5: Fix possible ABBA deadlock by keeping I2C clock prepared
i2c: cpm: Fix build break due to incompatible pointer types
perf intel-pt: Fix segfault tracing transactions
drm/i915: Use fw_domains_put_with_fifo() on HSW
drm/i915: Fixup the free space logic in ring_prepare
drm/amdkfd: uninitialized variable in dbgdev_wave_control_set_registers()
drm/i915: skl_update_scaler() wants a rotation bitmask instead of bit number
drm/i915: Cleanup phys status page too
pwm: brcmstb: Fix check of devm_ioremap_resource() return code
drm/dp/mst: Get validated port ref in drm_dp_update_payload_part1()
drm/dp/mst: Restore primary hub guid on resume
drm/dp/mst: Validate port in drm_dp_payload_send_msg()
drm/nouveau/gr/gf100: select a stream master to fixup tfb offset queries
drm: Loongson-3 doesn't fully support wc memory
drm/radeon: fix vertical bars appear on monitor (v2)
drm/radeon: forbid mapping of userptr bo through radeon device file
drm/radeon: fix initial connector audio value
drm/radeon: add a quirk for a XFX R9 270X
drm/amdgpu: fix regression on CIK (v2)
amdgpu/uvd: add uvd fw version for amdgpu
drm/amdgpu: bump the afmt limit for CZ, ST, Polaris
drm/amdgpu: use defines for CRTCs and AMFT blocks
drm/amdgpu: when suspending, if uvd/vce was running. need to cancel delay work.
iommu/dma: Restore scatterlist offsets correctly
iommu/amd: Fix checking of pci dma aliases
pinctrl: single: Fix pcs_parse_bits_in_pinctrl_entry to use __ffs than ffs
pinctrl: mediatek: correct debounce time unit in mtk_gpio_set_debounce
xen kconfig: don't "select INPUT_XEN_KBDDEV_FRONTEND"
Input: pmic8xxx-pwrkey - fix algorithm for converting trigger delay
Input: gtco - fix crash on detecting device without endpoints
netlink: don't send NETLINK_URELEASE for unbound sockets
nl80211: check netlink protocol in socket release notification
powerpc: Update TM user feature bits in scan_features()
powerpc: Update cpu_user_features2 in scan_features()
powerpc: scan_features() updates incorrect bits for REAL_LE
crypto: talitos - fix AEAD tcrypt tests
crypto: talitos - fix crash in talitos_cra_init()
crypto: sha1-mb - use corrcet pointer while completing jobs
crypto: ccp - Prevent information leakage on export
iwlwifi: mvm: fix memory leak in paging
iwlwifi: pcie: lower the debug level for RSA semaphore access
s390/pci: add extra padding to function measurement block
cpufreq: intel_pstate: Fix processing for turbo activation ratio
Revert "drm/amdgpu: disable runtime pm on PX laptops without dGPU power control"
Revert "drm/radeon: disable runtime pm on PX laptops without dGPU power control"
drm/i915: Fix race condition in intel_dp_destroy_mst_connector()
drm/qxl: fix cursor position with non-zero hotspot
drm/nouveau/core: use vzalloc for allocating ramht
futex: Acknowledge a new waiter in counter before plist
futex: Handle unlock_pi race gracefully
asm-generic/futex: Re-enable preemption in futex_atomic_cmpxchg_inatomic()
ALSA: hda - Add dock support for ThinkPad X260
ALSA: pcxhr: Fix missing mutex unlock
ALSA: hda - add PCI ID for Intel Broxton-T
ALSA: hda - Keep powering up ADCs on Cirrus codecs
ALSA: hda/realtek - Add ALC3234 headset mode for Optiplex 9020m
ALSA: hda - Don't trust the reported actual power state
x86 EDAC, sb_edac.c: Repair damage introduced when "fixing" channel address
x86/mm/xen: Suppress hugetlbfs in PV guests
arm64: Update PTE_RDONLY in set_pte_at() for PROT_NONE permission
arm64: Honour !PTE_WRITE in set_pte_at() for kernel mappings
sched/cgroup: Fix/cleanup cgroup teardown/init
dmaengine: pxa_dma: fix the maximum requestor line
dmaengine: hsu: correct use of channel status register
dmaengine: dw: fix master selection
debugfs: Make automount point inodes permanently empty
lib: lz4: fixed zram with lz4 on big endian machines
dm cache metadata: fix cmd_read_lock() acquiring write lock
dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros
usb: gadget: f_fs: Fix use-after-free
usb: hcd: out of bounds access in for_each_companion
xhci: fix 10 second timeout on removal of PCI hotpluggable xhci controllers
usb: xhci: fix wild pointers in xhci_mem_cleanup
xhci: resume USB 3 roothub first
usb: xhci: applying XHCI_PME_STUCK_QUIRK to Intel BXT B0 host
assoc_array: don't call compare_object() on a node
ARM: OMAP2+: hwmod: Fix updating of sysconfig register
ARM: OMAP2: Fix up interconnect barrier initialization for DRA7
ARM: mvebu: Correct unit address for linksys
ARM: dts: AM43x-epos: Fix clk parent for synctimer
KVM: arm/arm64: Handle forward time correction gracefully
kvm: x86: do not leak guest xcr0 into host interrupt handlers
x86/mce: Avoid using object after free in genpool
block: loop: fix filesystem corruption in case of aio/dio
block: partition: initialize percpuref before sending out KOBJ_ADD
Conflicts:
arch/arm64/Kconfig
arch/arm64/include/asm/cputype.h
arch/arm64/include/asm/hardirq.h
arch/arm64/include/asm/irq.h
arch/arm64/include/asm/mmu_context.h
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/cpuinfo.c
arch/arm64/kernel/setup.c
arch/arm64/kernel/smp.c
arch/arm64/kernel/stacktrace.c
arch/arm64/mm/init.c
arch/arm64/mm/mmu.c
arch/arm64/mm/pageattr.c
mm/memcontrol.c
CRs-Fixed: 1069136
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Change-Id: Ie9a16debd0578331a66947376f3b787a7bb54d65
621 lines
19 KiB
C
621 lines
19 KiB
C
#ifndef __LINUX_DCACHE_H
|
|
#define __LINUX_DCACHE_H
|
|
|
|
#include <linux/atomic.h>
|
|
#include <linux/list.h>
|
|
#include <linux/rculist.h>
|
|
#include <linux/rculist_bl.h>
|
|
#include <linux/spinlock.h>
|
|
#include <linux/seqlock.h>
|
|
#include <linux/cache.h>
|
|
#include <linux/rcupdate.h>
|
|
#include <linux/lockref.h>
|
|
|
|
struct path;
|
|
struct vfsmount;
|
|
|
|
/*
|
|
* linux/include/linux/dcache.h
|
|
*
|
|
* Dirent cache data structures
|
|
*
|
|
* (C) Copyright 1997 Thomas Schoebel-Theuer,
|
|
* with heavy changes by Linus Torvalds
|
|
*/
|
|
|
|
#define IS_ROOT(x) ((x) == (x)->d_parent)
|
|
|
|
/* The hash is always the low bits of hash_len */
|
|
#ifdef __LITTLE_ENDIAN
|
|
#define HASH_LEN_DECLARE u32 hash; u32 len;
|
|
#define bytemask_from_count(cnt) (~(~0ul << (cnt)*8))
|
|
#else
|
|
#define HASH_LEN_DECLARE u32 len; u32 hash;
|
|
#define bytemask_from_count(cnt) (~(~0ul >> (cnt)*8))
|
|
#endif
|
|
|
|
/*
|
|
* "quick string" -- eases parameter passing, but more importantly
|
|
* saves "metadata" about the string (ie length and the hash).
|
|
*
|
|
* hash comes first so it snuggles against d_parent in the
|
|
* dentry.
|
|
*/
|
|
struct qstr {
|
|
union {
|
|
struct {
|
|
HASH_LEN_DECLARE;
|
|
};
|
|
u64 hash_len;
|
|
};
|
|
const unsigned char *name;
|
|
};
|
|
|
|
#define QSTR_INIT(n,l) { { { .len = l } }, .name = n }
|
|
#define hashlen_hash(hashlen) ((u32) (hashlen))
|
|
#define hashlen_len(hashlen) ((u32)((hashlen) >> 32))
|
|
#define hashlen_create(hash,len) (((u64)(len)<<32)|(u32)(hash))
|
|
|
|
struct dentry_stat_t {
|
|
long nr_dentry;
|
|
long nr_unused;
|
|
long age_limit; /* age in seconds */
|
|
long want_pages; /* pages requested by system */
|
|
long dummy[2];
|
|
};
|
|
extern struct dentry_stat_t dentry_stat;
|
|
|
|
/* Name hashing routines. Initial hash value */
|
|
/* Hash courtesy of the R5 hash in reiserfs modulo sign bits */
|
|
#define init_name_hash() 0
|
|
|
|
/* partial hash update function. Assume roughly 4 bits per character */
|
|
static inline unsigned long
|
|
partial_name_hash(unsigned long c, unsigned long prevhash)
|
|
{
|
|
return (prevhash + (c << 4) + (c >> 4)) * 11;
|
|
}
|
|
|
|
/*
|
|
* Finally: cut down the number of bits to a int value (and try to avoid
|
|
* losing bits)
|
|
*/
|
|
static inline unsigned long end_name_hash(unsigned long hash)
|
|
{
|
|
return (unsigned int) hash;
|
|
}
|
|
|
|
/* Compute the hash for a name string. */
|
|
extern unsigned int full_name_hash(const unsigned char *, unsigned int);
|
|
|
|
/*
|
|
* Try to keep struct dentry aligned on 64 byte cachelines (this will
|
|
* give reasonable cacheline footprint with larger lines without the
|
|
* large memory footprint increase).
|
|
*/
|
|
#ifdef CONFIG_64BIT
|
|
# define DNAME_INLINE_LEN 32 /* 192 bytes */
|
|
#else
|
|
# ifdef CONFIG_SMP
|
|
# define DNAME_INLINE_LEN 36 /* 128 bytes */
|
|
# else
|
|
# define DNAME_INLINE_LEN 40 /* 128 bytes */
|
|
# endif
|
|
#endif
|
|
|
|
#define d_lock d_lockref.lock
|
|
|
|
struct dentry {
|
|
/* RCU lookup touched fields */
|
|
unsigned int d_flags; /* protected by d_lock */
|
|
seqcount_t d_seq; /* per dentry seqlock */
|
|
struct hlist_bl_node d_hash; /* lookup hash list */
|
|
struct dentry *d_parent; /* parent directory */
|
|
struct qstr d_name;
|
|
struct inode *d_inode; /* Where the name belongs to - NULL is
|
|
* negative */
|
|
unsigned char d_iname[DNAME_INLINE_LEN]; /* small names */
|
|
|
|
/* Ref lookup also touches following */
|
|
struct lockref d_lockref; /* per-dentry lock and refcount */
|
|
const struct dentry_operations *d_op;
|
|
struct super_block *d_sb; /* The root of the dentry tree */
|
|
unsigned long d_time; /* used by d_revalidate */
|
|
void *d_fsdata; /* fs-specific data */
|
|
|
|
struct list_head d_lru; /* LRU list */
|
|
struct list_head d_child; /* child of parent list */
|
|
struct list_head d_subdirs; /* our children */
|
|
/*
|
|
* d_alias and d_rcu can share memory
|
|
*/
|
|
union {
|
|
struct hlist_node d_alias; /* inode alias list */
|
|
struct rcu_head d_rcu;
|
|
} d_u;
|
|
};
|
|
|
|
/*
|
|
* dentry->d_lock spinlock nesting subclasses:
|
|
*
|
|
* 0: normal
|
|
* 1: nested
|
|
*/
|
|
enum dentry_d_lock_class
|
|
{
|
|
DENTRY_D_LOCK_NORMAL, /* implicitly used by plain spin_lock() APIs. */
|
|
DENTRY_D_LOCK_NESTED
|
|
};
|
|
|
|
struct dentry_operations {
|
|
int (*d_revalidate)(struct dentry *, unsigned int);
|
|
int (*d_weak_revalidate)(struct dentry *, unsigned int);
|
|
int (*d_hash)(const struct dentry *, struct qstr *);
|
|
int (*d_compare)(const struct dentry *, const struct dentry *,
|
|
unsigned int, const char *, const struct qstr *);
|
|
int (*d_delete)(const struct dentry *);
|
|
void (*d_release)(struct dentry *);
|
|
void (*d_prune)(struct dentry *);
|
|
void (*d_iput)(struct dentry *, struct inode *);
|
|
char *(*d_dname)(struct dentry *, char *, int);
|
|
struct vfsmount *(*d_automount)(struct path *);
|
|
int (*d_manage)(struct dentry *, bool);
|
|
struct inode *(*d_select_inode)(struct dentry *, unsigned);
|
|
void (*d_canonical_path)(const struct path *, struct path *);
|
|
struct dentry *(*d_real)(struct dentry *, struct inode *);
|
|
} ____cacheline_aligned;
|
|
|
|
/*
|
|
* Locking rules for dentry_operations callbacks are to be found in
|
|
* Documentation/filesystems/Locking. Keep it updated!
|
|
*
|
|
* FUrther descriptions are found in Documentation/filesystems/vfs.txt.
|
|
* Keep it updated too!
|
|
*/
|
|
|
|
/* d_flags entries */
|
|
#define DCACHE_OP_HASH 0x00000001
|
|
#define DCACHE_OP_COMPARE 0x00000002
|
|
#define DCACHE_OP_REVALIDATE 0x00000004
|
|
#define DCACHE_OP_DELETE 0x00000008
|
|
#define DCACHE_OP_PRUNE 0x00000010
|
|
|
|
#define DCACHE_DISCONNECTED 0x00000020
|
|
/* This dentry is possibly not currently connected to the dcache tree, in
|
|
* which case its parent will either be itself, or will have this flag as
|
|
* well. nfsd will not use a dentry with this bit set, but will first
|
|
* endeavour to clear the bit either by discovering that it is connected,
|
|
* or by performing lookup operations. Any filesystem which supports
|
|
* nfsd_operations MUST have a lookup function which, if it finds a
|
|
* directory inode with a DCACHE_DISCONNECTED dentry, will d_move that
|
|
* dentry into place and return that dentry rather than the passed one,
|
|
* typically using d_splice_alias. */
|
|
|
|
#define DCACHE_REFERENCED 0x00000040 /* Recently used, don't discard. */
|
|
#define DCACHE_RCUACCESS 0x00000080 /* Entry has ever been RCU-visible */
|
|
|
|
#define DCACHE_CANT_MOUNT 0x00000100
|
|
#define DCACHE_GENOCIDE 0x00000200
|
|
#define DCACHE_SHRINK_LIST 0x00000400
|
|
|
|
#define DCACHE_OP_WEAK_REVALIDATE 0x00000800
|
|
|
|
#define DCACHE_NFSFS_RENAMED 0x00001000
|
|
/* this dentry has been "silly renamed" and has to be deleted on the last
|
|
* dput() */
|
|
#define DCACHE_COOKIE 0x00002000 /* For use by dcookie subsystem */
|
|
#define DCACHE_FSNOTIFY_PARENT_WATCHED 0x00004000
|
|
/* Parent inode is watched by some fsnotify listener */
|
|
|
|
#define DCACHE_DENTRY_KILLED 0x00008000
|
|
|
|
#define DCACHE_MOUNTED 0x00010000 /* is a mountpoint */
|
|
#define DCACHE_NEED_AUTOMOUNT 0x00020000 /* handle automount on this dir */
|
|
#define DCACHE_MANAGE_TRANSIT 0x00040000 /* manage transit from this dirent */
|
|
#define DCACHE_MANAGED_DENTRY \
|
|
(DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT)
|
|
|
|
#define DCACHE_LRU_LIST 0x00080000
|
|
|
|
#define DCACHE_ENTRY_TYPE 0x00700000
|
|
#define DCACHE_MISS_TYPE 0x00000000 /* Negative dentry (maybe fallthru to nowhere) */
|
|
#define DCACHE_WHITEOUT_TYPE 0x00100000 /* Whiteout dentry (stop pathwalk) */
|
|
#define DCACHE_DIRECTORY_TYPE 0x00200000 /* Normal directory */
|
|
#define DCACHE_AUTODIR_TYPE 0x00300000 /* Lookupless directory (presumed automount) */
|
|
#define DCACHE_REGULAR_TYPE 0x00400000 /* Regular file type (or fallthru to such) */
|
|
#define DCACHE_SPECIAL_TYPE 0x00500000 /* Other file type (or fallthru to such) */
|
|
#define DCACHE_SYMLINK_TYPE 0x00600000 /* Symlink (or fallthru to such) */
|
|
|
|
#define DCACHE_MAY_FREE 0x00800000
|
|
#define DCACHE_FALLTHRU 0x01000000 /* Fall through to lower layer */
|
|
#define DCACHE_OP_SELECT_INODE 0x02000000 /* Unioned entry: dcache op selects inode */
|
|
#define DCACHE_OP_REAL 0x08000000
|
|
|
|
extern seqlock_t rename_lock;
|
|
|
|
/*
|
|
* These are the low-level FS interfaces to the dcache..
|
|
*/
|
|
extern void d_instantiate(struct dentry *, struct inode *);
|
|
extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
|
|
extern int d_instantiate_no_diralias(struct dentry *, struct inode *);
|
|
extern void __d_drop(struct dentry *dentry);
|
|
extern void d_drop(struct dentry *dentry);
|
|
extern void d_delete(struct dentry *);
|
|
extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op);
|
|
|
|
/* allocate/de-allocate */
|
|
extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
|
|
extern struct dentry * d_alloc_pseudo(struct super_block *, const struct qstr *);
|
|
extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
|
|
extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
|
|
extern struct dentry *d_find_any_alias(struct inode *inode);
|
|
extern struct dentry * d_obtain_alias(struct inode *);
|
|
extern struct dentry * d_obtain_root(struct inode *);
|
|
extern void shrink_dcache_sb(struct super_block *);
|
|
extern void shrink_dcache_parent(struct dentry *);
|
|
extern void shrink_dcache_for_umount(struct super_block *);
|
|
extern void d_invalidate(struct dentry *);
|
|
|
|
/* only used at mount-time */
|
|
extern struct dentry * d_make_root(struct inode *);
|
|
|
|
/* <clickety>-<click> the ramfs-type tree */
|
|
extern void d_genocide(struct dentry *);
|
|
|
|
extern void d_tmpfile(struct dentry *, struct inode *);
|
|
|
|
extern struct dentry *d_find_alias(struct inode *);
|
|
extern void d_prune_aliases(struct inode *);
|
|
|
|
/* test whether we have any submounts in a subdir tree */
|
|
extern int have_submounts(struct dentry *);
|
|
|
|
/*
|
|
* This adds the entry to the hash queues.
|
|
*/
|
|
extern void d_rehash(struct dentry *);
|
|
|
|
/**
|
|
* d_add - add dentry to hash queues
|
|
* @entry: dentry to add
|
|
* @inode: The inode to attach to this dentry
|
|
*
|
|
* This adds the entry to the hash queues and initializes @inode.
|
|
* The entry was actually filled in earlier during d_alloc().
|
|
*/
|
|
|
|
static inline void d_add(struct dentry *entry, struct inode *inode)
|
|
{
|
|
d_instantiate(entry, inode);
|
|
d_rehash(entry);
|
|
}
|
|
|
|
/**
|
|
* d_add_unique - add dentry to hash queues without aliasing
|
|
* @entry: dentry to add
|
|
* @inode: The inode to attach to this dentry
|
|
*
|
|
* This adds the entry to the hash queues and initializes @inode.
|
|
* The entry was actually filled in earlier during d_alloc().
|
|
*/
|
|
static inline struct dentry *d_add_unique(struct dentry *entry, struct inode *inode)
|
|
{
|
|
struct dentry *res;
|
|
|
|
res = d_instantiate_unique(entry, inode);
|
|
d_rehash(res != NULL ? res : entry);
|
|
return res;
|
|
}
|
|
|
|
extern void dentry_update_name_case(struct dentry *, struct qstr *);
|
|
|
|
/* used for rename() and baskets */
|
|
extern void d_move(struct dentry *, struct dentry *);
|
|
extern void d_exchange(struct dentry *, struct dentry *);
|
|
extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
|
|
|
|
/* appendix may either be NULL or be used for transname suffixes */
|
|
extern struct dentry *d_lookup(const struct dentry *, const struct qstr *);
|
|
extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);
|
|
extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *);
|
|
extern struct dentry *__d_lookup_rcu(const struct dentry *parent,
|
|
const struct qstr *name, unsigned *seq);
|
|
|
|
static inline unsigned d_count(const struct dentry *dentry)
|
|
{
|
|
return dentry->d_lockref.count;
|
|
}
|
|
|
|
/*
|
|
* helper function for dentry_operations.d_dname() members
|
|
*/
|
|
extern __printf(4, 5)
|
|
char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
|
|
extern char *simple_dname(struct dentry *, char *, int);
|
|
|
|
extern char *__d_path(const struct path *, const struct path *, char *, int);
|
|
extern char *d_absolute_path(const struct path *, char *, int);
|
|
extern char *d_path(const struct path *, char *, int);
|
|
extern char *dentry_path_raw(struct dentry *, char *, int);
|
|
extern char *dentry_path(struct dentry *, char *, int);
|
|
|
|
/* Allocation counts.. */
|
|
|
|
/**
|
|
* dget, dget_dlock - get a reference to a dentry
|
|
* @dentry: dentry to get a reference to
|
|
*
|
|
* Given a dentry or %NULL pointer increment the reference count
|
|
* if appropriate and return the dentry. A dentry will not be
|
|
* destroyed when it has references.
|
|
*/
|
|
static inline struct dentry *dget_dlock(struct dentry *dentry)
|
|
{
|
|
if (dentry)
|
|
dentry->d_lockref.count++;
|
|
return dentry;
|
|
}
|
|
|
|
static inline struct dentry *dget(struct dentry *dentry)
|
|
{
|
|
if (dentry)
|
|
lockref_get(&dentry->d_lockref);
|
|
return dentry;
|
|
}
|
|
|
|
extern struct dentry *dget_parent(struct dentry *dentry);
|
|
|
|
/**
|
|
* d_unhashed - is dentry hashed
|
|
* @dentry: entry to check
|
|
*
|
|
* Returns true if the dentry passed is not currently hashed.
|
|
*/
|
|
|
|
static inline int d_unhashed(const struct dentry *dentry)
|
|
{
|
|
return hlist_bl_unhashed(&dentry->d_hash);
|
|
}
|
|
|
|
static inline int d_unlinked(const struct dentry *dentry)
|
|
{
|
|
return d_unhashed(dentry) && !IS_ROOT(dentry);
|
|
}
|
|
|
|
static inline int cant_mount(const struct dentry *dentry)
|
|
{
|
|
return (dentry->d_flags & DCACHE_CANT_MOUNT);
|
|
}
|
|
|
|
static inline void dont_mount(struct dentry *dentry)
|
|
{
|
|
spin_lock(&dentry->d_lock);
|
|
dentry->d_flags |= DCACHE_CANT_MOUNT;
|
|
spin_unlock(&dentry->d_lock);
|
|
}
|
|
|
|
extern void dput(struct dentry *);
|
|
|
|
static inline bool d_managed(const struct dentry *dentry)
|
|
{
|
|
return dentry->d_flags & DCACHE_MANAGED_DENTRY;
|
|
}
|
|
|
|
static inline bool d_mountpoint(const struct dentry *dentry)
|
|
{
|
|
return dentry->d_flags & DCACHE_MOUNTED;
|
|
}
|
|
|
|
/*
|
|
* Directory cache entry type accessor functions.
|
|
*/
|
|
static inline unsigned __d_entry_type(const struct dentry *dentry)
|
|
{
|
|
return dentry->d_flags & DCACHE_ENTRY_TYPE;
|
|
}
|
|
|
|
static inline bool d_is_miss(const struct dentry *dentry)
|
|
{
|
|
return __d_entry_type(dentry) == DCACHE_MISS_TYPE;
|
|
}
|
|
|
|
static inline bool d_is_whiteout(const struct dentry *dentry)
|
|
{
|
|
return __d_entry_type(dentry) == DCACHE_WHITEOUT_TYPE;
|
|
}
|
|
|
|
static inline bool d_can_lookup(const struct dentry *dentry)
|
|
{
|
|
return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE;
|
|
}
|
|
|
|
static inline bool d_is_autodir(const struct dentry *dentry)
|
|
{
|
|
return __d_entry_type(dentry) == DCACHE_AUTODIR_TYPE;
|
|
}
|
|
|
|
static inline bool d_is_dir(const struct dentry *dentry)
|
|
{
|
|
return d_can_lookup(dentry) || d_is_autodir(dentry);
|
|
}
|
|
|
|
static inline bool d_is_symlink(const struct dentry *dentry)
|
|
{
|
|
return __d_entry_type(dentry) == DCACHE_SYMLINK_TYPE;
|
|
}
|
|
|
|
static inline bool d_is_reg(const struct dentry *dentry)
|
|
{
|
|
return __d_entry_type(dentry) == DCACHE_REGULAR_TYPE;
|
|
}
|
|
|
|
static inline bool d_is_special(const struct dentry *dentry)
|
|
{
|
|
return __d_entry_type(dentry) == DCACHE_SPECIAL_TYPE;
|
|
}
|
|
|
|
static inline bool d_is_file(const struct dentry *dentry)
|
|
{
|
|
return d_is_reg(dentry) || d_is_special(dentry);
|
|
}
|
|
|
|
static inline bool d_is_negative(const struct dentry *dentry)
|
|
{
|
|
// TODO: check d_is_whiteout(dentry) also.
|
|
return d_is_miss(dentry);
|
|
}
|
|
|
|
static inline bool d_is_positive(const struct dentry *dentry)
|
|
{
|
|
return !d_is_negative(dentry);
|
|
}
|
|
|
|
/**
|
|
* d_really_is_negative - Determine if a dentry is really negative (ignoring fallthroughs)
|
|
* @dentry: The dentry in question
|
|
*
|
|
* Returns true if the dentry represents either an absent name or a name that
|
|
* doesn't map to an inode (ie. ->d_inode is NULL). The dentry could represent
|
|
* a true miss, a whiteout that isn't represented by a 0,0 chardev or a
|
|
* fallthrough marker in an opaque directory.
|
|
*
|
|
* Note! (1) This should be used *only* by a filesystem to examine its own
|
|
* dentries. It should not be used to look at some other filesystem's
|
|
* dentries. (2) It should also be used in combination with d_inode() to get
|
|
* the inode. (3) The dentry may have something attached to ->d_lower and the
|
|
* type field of the flags may be set to something other than miss or whiteout.
|
|
*/
|
|
static inline bool d_really_is_negative(const struct dentry *dentry)
|
|
{
|
|
return dentry->d_inode == NULL;
|
|
}
|
|
|
|
/**
|
|
* d_really_is_positive - Determine if a dentry is really positive (ignoring fallthroughs)
|
|
* @dentry: The dentry in question
|
|
*
|
|
* Returns true if the dentry represents a name that maps to an inode
|
|
* (ie. ->d_inode is not NULL). The dentry might still represent a whiteout if
|
|
* that is represented on medium as a 0,0 chardev.
|
|
*
|
|
* Note! (1) This should be used *only* by a filesystem to examine its own
|
|
* dentries. It should not be used to look at some other filesystem's
|
|
* dentries. (2) It should also be used in combination with d_inode() to get
|
|
* the inode.
|
|
*/
|
|
static inline bool d_really_is_positive(const struct dentry *dentry)
|
|
{
|
|
return dentry->d_inode != NULL;
|
|
}
|
|
|
|
static inline int simple_positive(struct dentry *dentry)
|
|
{
|
|
return d_really_is_positive(dentry) && !d_unhashed(dentry);
|
|
}
|
|
|
|
extern void d_set_fallthru(struct dentry *dentry);
|
|
|
|
static inline bool d_is_fallthru(const struct dentry *dentry)
|
|
{
|
|
return dentry->d_flags & DCACHE_FALLTHRU;
|
|
}
|
|
|
|
|
|
extern int sysctl_vfs_cache_pressure;
|
|
|
|
static inline unsigned long vfs_pressure_ratio(unsigned long val)
|
|
{
|
|
return mult_frac(val, sysctl_vfs_cache_pressure, 100);
|
|
}
|
|
|
|
/**
|
|
* d_inode - Get the actual inode of this dentry
|
|
* @dentry: The dentry to query
|
|
*
|
|
* This is the helper normal filesystems should use to get at their own inodes
|
|
* in their own dentries and ignore the layering superimposed upon them.
|
|
*/
|
|
static inline struct inode *d_inode(const struct dentry *dentry)
|
|
{
|
|
return dentry->d_inode;
|
|
}
|
|
|
|
/**
|
|
* d_inode_rcu - Get the actual inode of this dentry with ACCESS_ONCE()
|
|
* @dentry: The dentry to query
|
|
*
|
|
* This is the helper normal filesystems should use to get at their own inodes
|
|
* in their own dentries and ignore the layering superimposed upon them.
|
|
*/
|
|
static inline struct inode *d_inode_rcu(const struct dentry *dentry)
|
|
{
|
|
return ACCESS_ONCE(dentry->d_inode);
|
|
}
|
|
|
|
/**
|
|
* d_backing_inode - Get upper or lower inode we should be using
|
|
* @upper: The upper layer
|
|
*
|
|
* This is the helper that should be used to get at the inode that will be used
|
|
* if this dentry were to be opened as a file. The inode may be on the upper
|
|
* dentry or it may be on a lower dentry pinned by the upper.
|
|
*
|
|
* Normal filesystems should not use this to access their own inodes.
|
|
*/
|
|
static inline struct inode *d_backing_inode(const struct dentry *upper)
|
|
{
|
|
struct inode *inode = upper->d_inode;
|
|
|
|
return inode;
|
|
}
|
|
|
|
/**
|
|
* d_backing_dentry - Get upper or lower dentry we should be using
|
|
* @upper: The upper layer
|
|
*
|
|
* This is the helper that should be used to get the dentry of the inode that
|
|
* will be used if this dentry were opened as a file. It may be the upper
|
|
* dentry or it may be a lower dentry pinned by the upper.
|
|
*
|
|
* Normal filesystems should not use this to access their own dentries.
|
|
*/
|
|
static inline struct dentry *d_backing_dentry(struct dentry *upper)
|
|
{
|
|
return upper;
|
|
}
|
|
|
|
static inline struct dentry *d_real(struct dentry *dentry)
|
|
{
|
|
if (unlikely(dentry->d_flags & DCACHE_OP_REAL))
|
|
return dentry->d_op->d_real(dentry, NULL);
|
|
else
|
|
return dentry;
|
|
}
|
|
|
|
static inline struct inode *vfs_select_inode(struct dentry *dentry,
|
|
unsigned open_flags)
|
|
{
|
|
struct inode *inode = d_inode(dentry);
|
|
|
|
if (inode && unlikely(dentry->d_flags & DCACHE_OP_SELECT_INODE))
|
|
inode = dentry->d_op->d_select_inode(dentry, open_flags);
|
|
|
|
return inode;
|
|
}
|
|
|
|
/**
|
|
* d_real_inode - Return the real inode
|
|
* @dentry: The dentry to query
|
|
*
|
|
* If dentry is on an union/overlay, then return the underlying, real inode.
|
|
* Otherwise return d_inode().
|
|
*/
|
|
static inline struct inode *d_real_inode(struct dentry *dentry)
|
|
{
|
|
return d_backing_inode(d_real(dentry));
|
|
}
|
|
|
|
|
|
#endif /* __LINUX_DCACHE_H */
|