1. 04 Mar, 2015 4 commits
    • Jan Kara's avatar
      quota: Fix maximum quota limit settings · 7e08da50
      Jan Kara authored
      Currently quota format that supports 64-bit usage sets maximum quota
      limit as 2^64-1. However quota core code uses signed numbers to track
      usage and even limits themselves are stored in long long. Checking of
      maximum allowable limits worked by luck until commit 14bf61ff
      (quota: Switch ->get_dqblk() and ->set_dqblk() to use bytes as space
      units) because variable we compared with was unsigned. After that commit
      the type we compared against changed to signed and thus checks for
      maximum limits with the newest VFS quota format started to refuse any
      non-negative value. Later the problem was inadvertedly fixed by commit
      b10a0819 (quota: Store maximum space limit in bytes) because we
      started to compare against unsigned type as well.
      
      Fix possible future problems of this kind by setting maximum limits to
      2^63-1 to avoid overflow issues.
      Reported-by: default avatarCarlos Carvalho <carlos@fisica.ufpr.br>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      7e08da50
    • Konstantin Khlebnikov's avatar
      quota: reorder flags in quota state · 78197024
      Konstantin Khlebnikov authored
      Flags in struct quota_state keep flags for each quota type and
      some common flags. This patch reorders typed flags:
      
      Before:
      
      0 USRQUOTA DQUOT_USAGE_ENABLED
      1 USRQUOTA DQUOT_LIMITS_ENABLED
      2 USRQUOTA DQUOT_SUSPENDED
      3 GRPQUOTA DQUOT_USAGE_ENABLED
      4 GRPQUOTA DQUOT_LIMITS_ENABLED
      5 GRPQUOTA DQUOT_SUSPENDED
      6          DQUOT_QUOTA_SYS_FILE
      7          DQUOT_NEGATIVE_USAGE
      
      After:
      
      0 USRQUOTA DQUOT_USAGE_ENABLED
      1 GRPQUOTA DQUOT_USAGE_ENABLED
      2 USRQUOTA DQUOT_LIMITS_ENABLED
      3 GRPQUOTA DQUOT_LIMITS_ENABLED
      4 USRQUOTA DQUOT_SUSPENDED
      5 GRPQUOTA DQUOT_SUSPENDED
      6          DQUOT_QUOTA_SYS_FILE
      7          DQUOT_NEGATIVE_USAGE
      
      Now we can get bitmap of all enabled/suspended quota types without loop.
      For example suspended: (flags / DQUOT_SUSPENDED) & ((1 << MAXQUOTAS) - 1).
      
      add/remove: 0/1 grow/shrink: 3/11 up/down: 56/-215 (-159)
      function                                     old     new   delta
      __dquot_initialize                           423     447     +24
      dquot_transfer                               181     197     +16
      dquot_alloc_inode                            286     302     +16
      dquot_reclaim_space_nodirty                  316     313      -3
      dquot_claim_space_nodirty                    314     311      -3
      dquot_resume                                 286     281      -5
      dquot_free_inode                             332     324      -8
      __dquot_alloc_space                          500     492      -8
      dquot_disable                               1944    1929     -15
      dquot_quota_enable                           252     236     -16
      __dquot_free_space                           750     734     -16
      dquot_writeback_dquots                       625     608     -17
      __dquot_transfer                            1186    1154     -32
      dquot_quota_sync                             299     261     -38
      dquot_active.isra                             54       -     -54
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      78197024
    • Konstantin Khlebnikov's avatar
      quota: paranoia: check quota tree root · 69a25ee2
      Konstantin Khlebnikov authored
      Root level in quota tree must be already allocated otherwise this block
      could be used for something else.
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      69a25ee2
    • Konstantin Khlebnikov's avatar
      quota: optimize i_dquot access · 5bcd3b6f
      Konstantin Khlebnikov authored
      Remove redundant calls of i_dquot(), keep pointer in local variable.
      
      add/remove: 0/0 grow/shrink: 3/7 up/down: 40/-278 (-238)
      function                                     old     new   delta
      __dquot_free_space                           734     750     +16
      __dquot_alloc_space                          484     500     +16
      dquot_free_inode                             324     332      +8
      dquot_drop                                    82      69     -13
      vfs_load_quota_inode                        1357    1341     -16
      dquot_reclaim_space_nodirty                  348     316     -32
      dquot_disable                               1980    1944     -36
      dquot_claim_space_nodirty                    354     314     -40
      __dquot_drop                                 125      83     -42
      __dquot_initialize                           522     423     -99
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      5bcd3b6f
  2. 02 Mar, 2015 4 commits
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 023a6007
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "Two GPIO fixes:
      
         - Fix a translation problem in of_get_named_gpiod_flags()
      
         - Fix a long standing container_of() mistake in the TPS65912 driver"
      
      * tag 'gpio-v4.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: tps65912: fix wrong container_of arguments
        gpiolib: of: allow of_gpiochip_find_and_xlate to find more than one chip per node
      023a6007
    • Linus Torvalds's avatar
      Merge branch 'fixes-for-4.0-rc2' of... · 10d6dfc1
      Linus Torvalds authored
      Merge branch 'fixes-for-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal
      
      Pull thermal management fixes from Eduardo Valentin:
       "Specifics:
      
         - Several fixes in tmon tool.
      
         - Fixes in intel int340x for _ART and _TRT tables.
      
         - Add id for Avoton SoC into powerclamp driver.
      
         - Fixes in RCAR thermal driver to remove race conditions and fix fail
           path
      
         - Fixes in TI thermal driver: removal of unnecessary code and build
           fix if !CONFIG_PM_SLEEP
      
         - Cleanups in exynos thermal driver
      
         - Add stubs for include/linux/thermal.h.  Now drivers using thermal
           calls but that also work without CONFIG_THERMAL will be able to
           compile for systems that don't care about thermal.
      
        Note: I am sending this pull on Rui's behalf while he fixes issues in
        his Linux box"
      
      * 'fixes-for-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
        thermal: int340x_thermal: Ignore missing _ART, _TRT tables
        thermal/intel_powerclamp: add id for Avoton SoC
        tools/thermal: tmon: silence 'set but not used' warnings
        tools/thermal: tmon: use pkg-config to determine library dependencies
        tools/thermal: tmon: support cross-compiling
        tools/thermal: tmon: add .gitignore
        tools/thermal: tmon: fixup tui windowing calculations
        tools/thermal: tmon: tui: don't hard-code dialog window size assumptions
        tools/thermal: tmon: add min/max macros
        tools/thermal: tmon: add --target-temp parameter
        thermal: exynos: Clean-up code to use oneline entry for exynos compatible table
        thermal: rcar: Make error and remove paths symmetrical with init
        thermal: rcar: Fix race condition between init and interrupt
        thermal: Introduce dummy functions when thermal is not defined
        ti-soc-thermal: Delete an unnecessary check before the function call "cpufreq_cooling_unregister"
        thermal: ti-soc-thermal: bandgap: Fix build warning if !CONFIG_PM_SLEEP
      10d6dfc1
    • Linus Torvalds's avatar
      Merge tag 'md/4.0-fixes' of git://neil.brown.name/md · 1a6f77ab
      Linus Torvalds authored
      Pull md fixes from Neil Brown:
       "Three md fixes:
      
         - fix a read-balance problem that was reported 2 years ago, but that
           I never noticed the report :-(
      
         - fix for rare RAID6 problem causing incorrect bitmap updates when
           two devices fail.
      
         - add __ATTR_PREALLOC annotation now that it is possible"
      
      * tag 'md/4.0-fixes' of git://neil.brown.name/md:
        md: mark some attributes as pre-alloc
        raid5: check faulty flag for array status during recovery.
        md/raid1: fix read balance when a drive is write-mostly.
      1a6f77ab
    • Linus Torvalds's avatar
      Merge tag 'metag-fixes-v4.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag · 49db1f0e
      Linus Torvalds authored
      Pull arch/metag fix from James Hogan:
       "This is just a single patch to fix the KSTK_EIP() and KSTK_ESP()
        macros for metag which have always been erronously returning the PC
        and stack pointer of the task's kernel context rather than from its
        user context saved at entry from userland into the kernel, which
        affects the contents of /proc/<pid>/maps and /proc/<pid>/stat"
      
      * tag 'metag-fixes-v4.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
        metag: Fix KSTK_EIP() and KSTK_ESP() macros
      49db1f0e
  3. 01 Mar, 2015 6 commits
  4. 28 Feb, 2015 26 commits