1. 14 4月, 2012 4 次提交
  2. 12 4月, 2012 3 次提交
  3. 11 4月, 2012 3 次提交
  4. 10 4月, 2012 7 次提交
  5. 07 4月, 2012 2 次提交
    • L
      Make the "word-at-a-time" helper functions more commonly usable · f68e556e
      Linus Torvalds 提交于
      I have a new optimized x86 "strncpy_from_user()" that will use these
      same helper functions for all the same reasons the name lookup code uses
      them.  This is preparation for that.
      
      This moves them into an architecture-specific header file.  It's
      architecture-specific for two reasons:
      
       - some of the functions are likely to want architecture-specific
         implementations.  Even if the current code happens to be "generic" in
         the sense that it should work on any little-endian machine, it's
         likely that the "multiply by a big constant and shift" implementation
         is less than optimal for an architecture that has a guaranteed fast
         bit count instruction, for example.
      
       - I expect that if architectures like sparc want to start playing
         around with this, we'll need to abstract out a few more details (in
         particular the actual unaligned accesses).  So we're likely to have
         more architecture-specific stuff if non-x86 architectures start using
         this.
      
         (and if it turns out that non-x86 architectures don't start using
         this, then having it in an architecture-specific header is still the
         right thing to do, of course)
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f68e556e
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 23f347ef
      Linus Torvalds 提交于
      Pull networking updates from David Miller:
      
       1) Fix inaccuracies in network driver interface documentation, from Ben
          Hutchings.
      
       2) Fix handling of negative offsets in BPF JITs, from Jan Seiffert.
      
       3) Compile warning, locking, and refcounting fixes in netfilter's
          xt_CT, from Pablo Neira Ayuso.
      
       4) phonet sendmsg needs to validate user length just like any other
          datagram protocol, fix from Sasha Levin.
      
       5) Ipv6 multicast code uses wrong loop index, from RongQing Li.
      
       6) Link handling and firmware fixes in bnx2x driver from Yaniv Rosner
          and Yuval Mintz.
      
       7) mlx4 erroneously allocates 4 pages at a time, regardless of page
          size, fix from Thadeu Lima de Souza Cascardo.
      
       8) SCTP socket option wasn't extended in a backwards compatible way,
          fix from Thomas Graf.
      
       9) Add missing address change event emissions to bonding, from Shlomo
          Pongratz.
      
      10) /proc/net/dev regressed because it uses a private offset to track
          where we are in the hash table, but this doesn't track the offset
          pullback that the seq_file code does resulting in some entries being
          missed in large dumps.
      
          Fix from Eric Dumazet.
      
      11) do_tcp_sendpage() unloads the send queue way too fast, because it
          invokes tcp_push() when it shouldn't.  Let the natural sequence
          generated by the splice paths, and the assosciated MSG_MORE
          settings, guide the tcp_push() calls.
      
          Otherwise what goes out of TCP is spaghetti and doesn't batch
          effectively into GSO/TSO clusters.
      
          From Eric Dumazet.
      
      12) Once we put a SKB into either the netlink receiver's queue or a
          socket error queue, it can be consumed and freed up, therefore we
          cannot touch it after queueing it like that.
      
          Fixes from Eric Dumazet.
      
      13) PPP has this annoying behavior in that for every transmit call it
          immediately stops the TX queue, then calls down into the next layer
          to transmit the PPP frame.
      
          But if that next layer can take it immediately, it just un-stops the
          TX queue right before returning from the transmit method.
      
          Besides being useless work, it makes several facilities unusable, in
          particular things like the equalizers.  Well behaved devices should
          only stop the TX queue when they really are full, and in PPP's case
          when it gets backlogged to the downstream device.
      
          David Woodhouse therefore fixed PPP to not stop the TX queue until
          it's downstream can't take data any more.
      
      14) IFF_UNICAST_FLT got accidently lost in some recent stmmac driver
          changes, re-add.  From Marc Kleine-Budde.
      
      15) Fix link flaps in ixgbe, from Eric W. Multanen.
      
      16) Descriptor writeback fixes in e1000e from Matthew Vick.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
        net: fix a race in sock_queue_err_skb()
        netlink: fix races after skb queueing
        doc, net: Update ndo_start_xmit return type and values
        doc, net: Remove instruction to set net_device::trans_start
        doc, net: Update netdev operation names
        doc, net: Update documentation of synchronisation for TX multiqueue
        doc, net: Remove obsolete reference to dev->poll
        ethtool: Remove exception to the requirement of holding RTNL lock
        MAINTAINERS: update for Marvell Ethernet drivers
        bonding: properly unset current_arp_slave on slave link up
        phonet: Check input from user before allocating
        tcp: tcp_sendpages() should call tcp_push() once
        ipv6: fix array index in ip6_mc_add_src()
        mlx4: allocate just enough pages instead of always 4 pages
        stmmac: re-add IFF_UNICAST_FLT for dwmac1000
        bnx2x: Clear MDC/MDIO warning message
        bnx2x: Fix BCM57711+BCM84823 link issue
        bnx2x: Clear BCM84833 LED after fan failure
        bnx2x: Fix BCM84833 PHY FW version presentation
        bnx2x: Fix link issue for BCM8727 boards.
        ...
      23f347ef
  6. 06 4月, 2012 21 次提交
    • E
      net: fix a race in sock_queue_err_skb() · 110c4330
      Eric Dumazet 提交于
      As soon as an skb is queued into socket error queue, another thread
      can consume it, so we are not allowed to reference skb anymore, or risk
      use after free.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      110c4330
    • E
      netlink: fix races after skb queueing · 4a7e7c2a
      Eric Dumazet 提交于
      As soon as an skb is queued into socket receive_queue, another thread
      can consume it, so we are not allowed to reference skb anymore, or risk
      use after free.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a7e7c2a
    • B
      doc, net: Update ndo_start_xmit return type and values · e34fac1c
      Ben Hutchings 提交于
      Commit dc1f8bf6 ('netdev: change
      transmit to limited range type') changed the required return type and
      9a1654ba ('net: Optimize
      hard_start_xmit() return checking') changed the valid numerical
      return values.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e34fac1c
    • B
      doc, net: Remove instruction to set net_device::trans_start · de7aca16
      Ben Hutchings 提交于
      Commit 08baf561 ('net:
      txq_trans_update() helper') made it unnecessary for most drivers to
      set net_device::trans_start (or netdev_queue::trans_start).
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de7aca16
    • B
      doc, net: Update netdev operation names · b3cf6545
      Ben Hutchings 提交于
      Commits d314774c ('netdev: network
      device operations infrastructure') and
      00829823 ('netdev: add more functions
      to netdevice ops') moved and renamed net device operation pointers.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3cf6545
    • B
      doc, net: Update documentation of synchronisation for TX multiqueue · 04fd3d35
      Ben Hutchings 提交于
      Commits e308a5d8 ('netdev: Add
      netdev->addr_list_lock protection.') and
      e8a0464c ('netdev: Allocate multiple
      queues for TX.') introduced more fine-grained locks.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      04fd3d35
    • B
      doc, net: Remove obsolete reference to dev->poll · 93b6a3ad
      Ben Hutchings 提交于
      Commit bea3348e ('[NET]: Make NAPI
      polling independent of struct net_device objects.') removed the
      automatic disabling of NAPI polling by dev_close(), and drivers
      must now do this themselves.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93b6a3ad
    • B
      ethtool: Remove exception to the requirement of holding RTNL lock · b4f79e5c
      Ben Hutchings 提交于
      Commit e52ac339 ('net: Use device
      model to get driver name in skb_gso_segment()') removed the only
      in-tree caller of ethtool ops that doesn't hold the RTNL lock.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4f79e5c
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 314489bd
      Linus Torvalds 提交于
      Pull "ARM: SoC fixes: from Olof Johansson:
       "A bunch of fixes for regressions (and a few other problems) in
        3.4-rc1:
      
       - Fix for regression of mach/io.h cleanup on platforms with PCI or
         PCMCIA (adding back the include file on those for now)
       - AT91 fixes for usb and spi
       - smsc911x ethernet fixes for i.MX
       - smsc911x fixes for OMAP
       - gpio fixes for Tegra
       - A handful of build error and warning fixes for various platforms
       - cpufreq kconfig dependencies, build and lowlevel debug fixes for
         Samsung platforms
      
        In other words, more or less the regular collection of -rc1/2 type
        material.  A few of them, in particular the smsc911x for OMAP series,
        aren't technically regressions for 3.4, but they're valid fixes and
        we're still relatively early in the rc cycle so it seems appropriate
        to include them."
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (60 commits)
        ARM: fix __io macro for PCMCIA
        ARM: EXYNOS: Fix compiler warning in dma.c file
        ARM: EXYNOS: fix ISO C90 warning
        ARM: OMAP2+: hwmod: Fix wrong SYSC_TYPE1_XXX_MASK bit definitions
        ARM: OMAP2+: hwmod: Make omap_hwmod_softreset wait for reset status
        ARM: OMAP2+: hwmod: Restore sysc after a reset
        ARM: OMAP2+: omap_hwmod: Allow io_ring wakeup configuration for all modules
        ARM: OMAP3: clock data: fill in some missing clockdomains
        ARM: OMAP4: clock data: Force a DPLL clkdm/pwrdm ON before a relock
        ARM: OMAP4: clock data: fix mult and div mask for USB_DPLL
        ARM: OMAP2+: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
        gpio: tegra: Iterate over the correct number of banks
        gpio: tegra: fix register address calculations for Tegra30
        EXYNOS: fix dependency for EXYNOS_CPUFREQ
        ARM: at91: dt: remove unit-address part for memory nodes
        ARM: at91: fix check of valid GPIO for SPI and USB
        USB: ehci-atmel: add needed of.h header file
        ARM: at91/NAND DT bindings: add comments
        ARM: at91/at91sam9x5.dtsi: fix NAND ale/cle in DT file
        USB: ohci-at91: trivial return code name change
        ...
      314489bd
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin · 43e347a1
      Linus Torvalds 提交于
      Pull a few blackfin compile fixes from Bob Liu.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin:
        blackfin: update defconfig for bf527-ezkit
        blackfin: gpio: fix compile error if !CONFIG_GPIOLIB
        blackfin: fix L1 data A overflow link issue
      43e347a1
    • B
      blackfin: update defconfig for bf527-ezkit · 35fe2e73
      Bob Liu 提交于
      To fix compile error:
      drivers/usb/musb/blackfin.h:51:3: error: #error "Please use PIO mode in MUSB
      driver on bf52x chip v0.0 and v0.1"
      make[4]: *** [drivers/usb/musb/blackfin.o] Error 1
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      35fe2e73
    • B
      blackfin: gpio: fix compile error if !CONFIG_GPIOLIB · e8c5c6da
      Bob Liu 提交于
      Add __gpio_get_value()/__gpio_set_value() to fix compile error if
      CONFIG_GPIOLIB = n.
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      e8c5c6da
    • M
      blackfin: fix L1 data A overflow link issue · 95fc2d8f
      Mike Frysinger 提交于
      This patch fix below compile error:
      "bfin-uclinux-ld: L1 data A overflow!"
      
      It is due to the recent lib/gen_crc32table.c change:
      46c5801e
      crc32: bolt on crc32c
      
      it added 8KiB more data to __cacheline_aligned which cause blackfin L1 data
      cache overflow.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      95fc2d8f
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm · fb9d78ac
      Linus Torvalds 提交于
      Pull an APM fix from Jiri Kosina:
       "One deadlock/race fix from Niel that got introduced when we were
        moving away from freezer_*_count() to wait_event_freezable()."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm:
        APM: fix deadlock in APM_IOC_SUSPEND ioctl
      fb9d78ac
    • O
      Merge tag 'omap-fixes-a2-for-3.4rc' of... · a8f5b6e5
      Olof Johansson 提交于
      Merge tag 'omap-fixes-a2-for-3.4rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into fixes
      
      From Paul Walmsley:
      
      OMAP clock, powerdomain, clockdomain, and hwmod fixes intended for the
      early v3.4-rc series.  Also contains an HSMMC integration refinement
      of an earlier hardware bug workaround.
      
      * tag 'omap-fixes-a2-for-3.4rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending:
        ARM: OMAP2+: hwmod: Fix wrong SYSC_TYPE1_XXX_MASK bit definitions
        ARM: OMAP2+: hwmod: Make omap_hwmod_softreset wait for reset status
        ARM: OMAP2+: hwmod: Restore sysc after a reset
        ARM: OMAP2+: omap_hwmod: Allow io_ring wakeup configuration for all modules
        ARM: OMAP3: clock data: fill in some missing clockdomains
        ARM: OMAP4: clock data: Force a DPLL clkdm/pwrdm ON before a relock
        ARM: OMAP4: clock data: fix mult and div mask for USB_DPLL
        ARM: OMAP2+: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
        ARM: OMAP AM3517/3505: clock data: change EMAC clocks aliases
        ARM: OMAP: clock: fix race in disable all clocks
        ARM: OMAP4: hwmod data: Add aliases for McBSP fclk clocks
        ARM: OMAP3xxx: clock data: fix DPLL4 CLKSEL masks
        ARM: OMAP3xxx: HSMMC: avoid erratum workaround when transceiver is attached
        ARM: OMAP44xx: clockdomain data: correct the emu_sys_clkdm CLKTRCTRL data
      a8f5b6e5
    • S
      MAINTAINERS: update for Marvell Ethernet drivers · 44c14c1d
      stephen hemminger 提交于
      Marvell has agreed to do maintenance on the sky2 driver.
         * Add the developer to the maintainers file
         * Remove the old reference to the long gone (sk98lin) driver
         * Rearrange to fit current topic organization
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      44c14c1d
    • V
      bonding: properly unset current_arp_slave on slave link up · 5a430974
      Veaceslav Falico 提交于
      When a slave comes up, we're unsetting the current_arp_slave without
      removing active flags from it, which can lead to situations where we have
      more than one slave with active flags in active-backup mode.
      
      To avoid this situation we must remove the active flags from a slave before
      removing it as a current_arp_slave.
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NMarcelo Ricardo Leitner <mleitner@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a430974
    • S
      phonet: Check input from user before allocating · bcf1b70a
      Sasha Levin 提交于
      A phonet packet is limited to USHRT_MAX bytes, this is never checked during
      tx which means that the user can specify any size he wishes, and the kernel
      will attempt to allocate that size.
      
      In the good case, it'll lead to the following warning, but it may also cause
      the kernel to kick in the OOM and kill a random task on the server.
      
      [ 8921.744094] WARNING: at mm/page_alloc.c:2255 __alloc_pages_slowpath+0x65/0x730()
      [ 8921.749770] Pid: 5081, comm: trinity Tainted: G        W    3.4.0-rc1-next-20120402-sasha #46
      [ 8921.756672] Call Trace:
      [ 8921.758185]  [<ffffffff810b2ba7>] warn_slowpath_common+0x87/0xb0
      [ 8921.762868]  [<ffffffff810b2be5>] warn_slowpath_null+0x15/0x20
      [ 8921.765399]  [<ffffffff8117eae5>] __alloc_pages_slowpath+0x65/0x730
      [ 8921.769226]  [<ffffffff81179c8a>] ? zone_watermark_ok+0x1a/0x20
      [ 8921.771686]  [<ffffffff8117d045>] ? get_page_from_freelist+0x625/0x660
      [ 8921.773919]  [<ffffffff8117f3a8>] __alloc_pages_nodemask+0x1f8/0x240
      [ 8921.776248]  [<ffffffff811c03e0>] kmalloc_large_node+0x70/0xc0
      [ 8921.778294]  [<ffffffff811c4bd4>] __kmalloc_node_track_caller+0x34/0x1c0
      [ 8921.780847]  [<ffffffff821b0e3c>] ? sock_alloc_send_pskb+0xbc/0x260
      [ 8921.783179]  [<ffffffff821b3c65>] __alloc_skb+0x75/0x170
      [ 8921.784971]  [<ffffffff821b0e3c>] sock_alloc_send_pskb+0xbc/0x260
      [ 8921.787111]  [<ffffffff821b002e>] ? release_sock+0x7e/0x90
      [ 8921.788973]  [<ffffffff821b0ff0>] sock_alloc_send_skb+0x10/0x20
      [ 8921.791052]  [<ffffffff824cfc20>] pep_sendmsg+0x60/0x380
      [ 8921.792931]  [<ffffffff824cb4a6>] ? pn_socket_bind+0x156/0x180
      [ 8921.794917]  [<ffffffff824cb50f>] ? pn_socket_autobind+0x3f/0x90
      [ 8921.797053]  [<ffffffff824cb63f>] pn_socket_sendmsg+0x4f/0x70
      [ 8921.798992]  [<ffffffff821ab8e7>] sock_aio_write+0x187/0x1b0
      [ 8921.801395]  [<ffffffff810e325e>] ? sub_preempt_count+0xae/0xf0
      [ 8921.803501]  [<ffffffff8111842c>] ? __lock_acquire+0x42c/0x4b0
      [ 8921.805505]  [<ffffffff821ab760>] ? __sock_recv_ts_and_drops+0x140/0x140
      [ 8921.807860]  [<ffffffff811e07cc>] do_sync_readv_writev+0xbc/0x110
      [ 8921.809986]  [<ffffffff811958e7>] ? might_fault+0x97/0xa0
      [ 8921.811998]  [<ffffffff817bd99e>] ? security_file_permission+0x1e/0x90
      [ 8921.814595]  [<ffffffff811e17e2>] do_readv_writev+0xe2/0x1e0
      [ 8921.816702]  [<ffffffff810b8dac>] ? do_setitimer+0x1ac/0x200
      [ 8921.818819]  [<ffffffff810e2ec1>] ? get_parent_ip+0x11/0x50
      [ 8921.820863]  [<ffffffff810e325e>] ? sub_preempt_count+0xae/0xf0
      [ 8921.823318]  [<ffffffff811e1926>] vfs_writev+0x46/0x60
      [ 8921.825219]  [<ffffffff811e1a3f>] sys_writev+0x4f/0xb0
      [ 8921.827127]  [<ffffffff82658039>] system_call_fastpath+0x16/0x1b
      [ 8921.829384] ---[ end trace dffe390f30db9eb7 ]---
      Signed-off-by: NSasha Levin <levinsasha928@gmail.com>
      Acked-by: NRémi Denis-Courmont <remi.denis-courmont@nokia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bcf1b70a
    • E
      tcp: tcp_sendpages() should call tcp_push() once · 35f9c09f
      Eric Dumazet 提交于
      commit 2f533844 (tcp: allow splice() to build full TSO packets) added
      a regression for splice() calls using SPLICE_F_MORE.
      
      We need to call tcp_flush() at the end of the last page processed in
      tcp_sendpages(), or else transmits can be deferred and future sends
      stall.
      
      Add a new internal flag, MSG_SENDPAGE_NOTLAST, acting like MSG_MORE, but
      with different semantic.
      
      For all sendpage() providers, its a transparent change. Only
      sock_sendpage() and tcp_sendpages() can differentiate the two different
      flags provided by pipe_to_sendpage()
      Reported-by: NTom Herbert <therbert@google.com>
      Cc: Nandita Dukkipati <nanditad@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Yuchung Cheng <ycheng@google.com>
      Cc: H.K. Jerry Chu <hkchu@google.com>
      Cc: Maciej Żenczykowski <maze@google.com>
      Cc: Mahesh Bandewar <maheshb@google.com>
      Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail&gt;com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      35f9c09f
    • L
      Merge branch 'akpm' (Andrew's patch-bomb) · 5d32c88f
      Linus Torvalds 提交于
      Merge batch of fixes from Andrew Morton:
       "The simple_open() cleanup was held back while I wanted for laggards to
        merge things.
      
        I still need to send a few checkpoint/restore patches.  I've been
        wobbly about merging them because I'm wobbly about the overall
        prospects for success of the project.  But after speaking with Pavel
        at the LSF conference, it sounds like they're further toward
        completion than I feared - apparently davem is at the "has stopped
        complaining" stage regarding the net changes.  So I need to go back
        and re-review those patchs and their (lengthy) discussion."
      
      * emailed from Andrew Morton <akpm@linux-foundation.org>: (16 patches)
        memcg swap: use mem_cgroup_uncharge_swap fix
        backlight: add driver for DA9052/53 PMIC v1
        C6X: use set_current_blocked() and block_sigmask()
        MAINTAINERS: add entry for sparse checker
        MAINTAINERS: fix REMOTEPROC F: typo
        alpha: use set_current_blocked() and block_sigmask()
        simple_open: automatically convert to simple_open()
        scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open()
        libfs: add simple_open()
        hugetlbfs: remove unregister_filesystem() when initializing module
        drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback
        fs/xattr.c:setxattr(): improve handling of allocation failures
        fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed
        fs/xattr.c: suppress page allocation failure warnings from sys_listxattr()
        sysrq: use SEND_SIG_FORCED instead of force_sig()
        proc: fix mount -t proc -o AAA
      5d32c88f
    • M
      memcg swap: use mem_cgroup_uncharge_swap fix · dac23b0d
      Michal Hocko 提交于
      Although mem_cgroup_uncharge_swap has an empty placeholder for
      !CONFIG_CGROUP_MEM_RES_CTLR_SWAP the definition is placed in the
      CONFIG_SWAP ifdef block so we are missing the same definition for
      !CONFIG_SWAP which implies !CONFIG_CGROUP_MEM_RES_CTLR_SWAP.
      
      This has not been an issue before, because mem_cgroup_uncharge_swap was
      not called from !CONFIG_SWAP context.  But Hugh Dickins has a cleanup
      patch to call __mem_cgroup_commit_charge_swapin which is defined also
      for !CONFIG_SWAP.
      
      Let's move both the empty definition and declaration outside of the
      CONFIG_SWAP block to avoid the following compilation error:
      
        mm/memcontrol.c: In function '__mem_cgroup_commit_charge_swapin':
        mm/memcontrol.c:2837: error: implicit declaration of function 'mem_cgroup_uncharge_swap'
      
      if CONFIG_SWAP is disabled.
      Reported-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NMichal Hocko <mhocko@suse.cz>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dac23b0d