/** * aops.h - Defines for NTFS kernel address space operations and page cache * handling. Part of the Linux-NTFS project. * * Copyright (c) 2001-2004 Anton Altaparmakov * Copyright (c) 2002 Richard Russon * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program/include file is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program (in the main directory of the Linux-NTFS * distribution in the file COPYING); if not, write to the Free Software * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _LINUX_NTFS_AOPS_H #define _LINUX_NTFS_AOPS_H #include #include #include #include #include "inode.h" /** * ntfs_unmap_page - release a page that was mapped using ntfs_map_page() * @page: the page to release * * Unpin, unmap and release a page that was obtained from ntfs_map_page(). */ static inline void ntfs_unmap_page(struct page *page) { kunmap(page); put_page(page); } /** * ntfs_map_page - map a page into accessible memory, reading it if necessary * @mapping: address space for which to obtain the page * @index: index into the page cache for @mapping of the page to map * * Read a page from the page cache of the address space @mapping at position * @index, where @index is in units of PAGE_SIZE, and not in bytes. * * If the page is not in memory it is loaded from disk first using the readpage * method defined in the address space operations of @mapping and the page is * added to the page cache of @mapping in the process. * * If the page belongs to an mst protected attribute and it is marked as such * in its ntfs inode (NInoMstProtected()) the mst fixups are applied but no * error checking is performed. This means the caller has to verify whether * the ntfs record(s) contained in the page are valid or not using one of the * ntfs_is_XXXX_record{,p}() macros, where XXXX is the record type you are * expecting to see. (For details of the macros, see fs/ntfs/layout.h.) * * If the page is in high memory it is mapped into memory directly addressible * by the kernel. * * Finally the page count is incremented, thus pinning the page into place. * * The above means that page_address(page) can be used on all pages obtained * with ntfs_map_page() to get the kernel virtual address of the page. * * When finished with the page, the caller has to call ntfs_unmap_page() to * unpin, unmap and release the page. * * Note this does not grant exclusive access. If such is desired, the caller * must provide it independently of the ntfs_{un}map_page() calls by using * a {rw_}semaphore or other means of serialization. A spin lock cannot be * used as ntfs_map_page() can block. * * The unlocked and uptodate page is returned on success or an encoded error * on failure. Caller has to test for error using the IS_ERR() macro on the * return value. If that evaluates to 'true', the negative error code can be * obtained using PTR_ERR() on the return value of ntfs_map_page(). */ static inline struct page *ntfs_map_page(struct address_space *mapping, unsigned long index) { struct page *page = read_mapping_page(mapping, index, NULL); if (!IS_ERR(page)) { kmap(page); if (!PageError(page)) return page; ntfs_unmap_page(page); return ERR_PTR(-EIO); } return page; } #ifdef NTFS_RW extern void mark_ntfs_record_dirty(struct page *page, const unsigned int ofs); #endif /* NTFS_RW */ #endif /* _LINUX_NTFS_AOPS_H */ option value='10'>10space:mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-27 12:54:16 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-27 12:54:16 -0800
commit1b1bc42c1692e9b62756323c675a44cb1a1f9dbd (patch)
treed514a2d8512fc52c15747841e2368f8f99a50787 /include/dt-bindings/pinctrl/samsung.h
parent3365135d43f861003555c963b309672d053a2228 (diff)
parent950eabbd6ddedc1b08350b9169a6a51b130ebaaf (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) GTP fixes from Andreas Schultz (missing genl module alias, clear IP DF on transmit). 2) Netfilter needs to reflect the fwmark when sending resets, from Pau Espin Pedrol. 3) nftable dump OOPS fix from Liping Zhang. 4) Fix erroneous setting of VIRTIO_NET_HDR_F_DATA_VALID on transmit, from Rolf Neugebauer. 5) Fix build error of ipt_CLUSTERIP when procfs is disabled, from Arnd Bergmann. 6) Fix regression in handling of NETIF_F_SG in harmonize_features(), from Eric Dumazet. 7) Fix RTNL deadlock wrt. lwtunnel module loading, from David Ahern. 8) tcp_fastopen_create_child() needs to setup tp->max_window, from Alexey Kodanev. 9) Missing kmemdup() failure check in ipv6 segment routing code, from Eric Dumazet. 10) Don't execute unix_bind() under the bindlock, otherwise we deadlock with splice. From WANG Cong. 11) ip6_tnl_parse_tlv_enc_lim() potentially reallocates the skb buffer, therefore callers must reload cached header pointers into that skb. Fix from Eric Dumazet. 12) Fix various bugs in legacy IRQ fallback handling in alx driver, from Tobias Regnery. 13) Do not allow lwtunnel drivers to be unloaded while they are referenced by active instances, from Robert Shearman. 14) Fix truncated PHY LED trigger names, from Geert Uytterhoeven. 15) Fix a few regressions from virtio_net XDP support, from John Fastabend and Jakub Kicinski. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (102 commits) ISDN: eicon: silence misleading array-bounds warning net: phy: micrel: add support for KSZ8795 gtp: fix cross netns recv on gtp socket gtp: clear DF bit on GTP packet tx gtp: add genl family modules alias tcp: don't annotate mark on control socket from tcp_v6_send_response() ravb: unmap descriptors when freeing rings virtio_net: reject XDP programs using header adjustment virtio_net: use dev_kfree_skb for small buffer XDP receive r8152: check rx after napi is enabled r8152: re-schedule napi for tx r8152: avoid start_xmit to schedule napi when napi is disabled r8152: avoid start_xmit to call napi_schedule during autosuspend net: dsa: Bring back device detaching in dsa_slave_suspend() net: phy: leds: Fix truncated LED trigger names net: phy: leds: Break dependency of phy.h on phy_led_triggers.h net: phy: leds: Clear phy_num_led_triggers on failure to avoid crash net-next: ethernet: mediatek: change the compatible string Documentation: devicetree: change the mediatek ethernet compatible string bnxt_en: Fix RTNL lock usage on bnxt_get_port_module_status(). ...
Diffstat (limited to 'include/dt-bindings/pinctrl/samsung.h')