1. 10 6月, 2021 1 次提交
  2. 03 6月, 2021 1 次提交
  3. 07 5月, 2021 1 次提交
  4. 06 5月, 2021 3 次提交
  5. 01 5月, 2021 5 次提交
  6. 24 4月, 2021 2 次提交
    • H
      mm/filemap: fix mapping_seek_hole_data on THP & 32-bit · ed98b015
      Hugh Dickins 提交于
      No problem on 64-bit, or without huge pages, but xfstests generic/285
      and other SEEK_HOLE/SEEK_DATA tests have regressed on huge tmpfs, and on
      32-bit architectures, with the new mapping_seek_hole_data().  Several
      different bugs turned out to need fixing.
      
      u64 cast to stop losing bits when converting unsigned long to loff_t
      (and let's use shifts throughout, rather than mixed with * and /).
      
      Use round_up() when advancing pos, to stop assuming that pos was already
      THP-aligned when advancing it by THP-size.  (This use of round_up()
      assumes that any THP has THP-aligned index: true at present and true
      going forward, but could be recoded to avoid the assumption.)
      
      Use xas_set() when iterating away from a THP, so that xa_index stays in
      synch with start, instead of drifting away to return bogus offset.
      
      Check start against end to avoid wrapping 32-bit xa_index to 0 (and to
      handle these additional cases, seek_data or not, it's easier to break
      the loop than goto: so rearrange exit from the function).
      
      [hughd@google.com: remove unneeded u64 casts, per Matthew]
        Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2104221347240.1170@eggly.anvils
      
      Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2104211737410.3299@eggly.anvils
      Fixes: 41139aa4 ("mm/filemap: add mapping_seek_hole_data")
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Chinner <dchinner@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: William Kucharski <william.kucharski@oracle.com>
      Cc: Yang Shi <yang.shi@linux.alibaba.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ed98b015
    • H
      mm/filemap: fix find_lock_entries hang on 32-bit THP · 2d11e738
      Hugh Dickins 提交于
      No problem on 64-bit, or without huge pages, but xfstests generic/308
      hung uninterruptibly on 32-bit huge tmpfs.
      
      Since commit 0cc3b0ec ("Clarify (and fix) in 4.13 MAX_LFS_FILESIZE
      macros"), MAX_LFS_FILESIZE is only a PAGE_SIZE away from wrapping 32-bit
      xa_index to 0, so the new find_lock_entries() has to be extra careful
      when handling a THP.
      
      Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2104211735430.3299@eggly.anvils
      Fixes: 5c211ba2 ("mm: add and use find_lock_entries")
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: William Kucharski <william.kucharski@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Chinner <dchinner@redhat.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Yang Shi <yang.shi@linux.alibaba.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2d11e738
  7. 23 4月, 2021 2 次提交
  8. 27 2月, 2021 9 次提交
  9. 25 2月, 2021 16 次提交