[PATCH v2 0/3] ext4: Prevent memory reclaim from re-entering the filesystem and deadlocking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series aims to prevent ext4_kvmalloc() from re-entering
the filesystem and deadlocking. Although __vmalloc() doesn't
support GFP_NOFS[1], all of the user of ext4_kvmalloc are using
GFP_NOFS (e.g. fs/ext4/resize.c::add_new_gdb), causing the memory
reclaim to re-enter the filesystem.

To fix this issue, use memalloc_nfs_save/restore() that get
__vmalloc() to drop __GFP_FS.

[1] linux-tree/Documentation/core-api/gfp-mask-fs-io.rst

Changes since v1:
  - Add Patch 1 to delete ext4_kvzvalloc() that is not used anywhere.
  - Add Patch 2 to rename ext4_kvmalloc() to ext4_kvmalloc_nofs() and
    drop its flags argument since all the users of ext4_kvmalloc() are
    using GFP_NOFS

Thanks,


Naoto Kobayashi (3):
  ext4: Delete ext4_kvzvalloc()
  ext4: Rename ext4_kvmalloc() to ext4_kvmalloc_nofs() and drop its
    flags argument
  ext4: Prevent ext4_kvmalloc_nofs() from re-entering the filesystem and
    deadlocking

 fs/ext4/ext4.h   |  3 +--
 fs/ext4/resize.c | 10 ++++------
 fs/ext4/super.c  | 21 +++++++--------------
 fs/ext4/xattr.c  |  2 +-
 4 files changed, 13 insertions(+), 23 deletions(-)


--
2.16.6




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux