]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: nfsiod should not block forever in mempool_alloc()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 21 Mar 2022 16:34:19 +0000 (12:34 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 22 Mar 2022 19:52:56 +0000 (15:52 -0400)
commit2d57b3020085e13e674f0aef7fd16f449674a8b1
tree1e60066cbf650cf06a95386681744d867490156b
parent1a33e22b8f035aac338ce0f4ccade8b6f3491053
NFS: nfsiod should not block forever in mempool_alloc()

The concern is that since nfsiod is sometimes required to kick off a
commit, it can get locked up waiting forever in mempool_alloc() instead
of failing gracefully and leaving the commit until later.

Try to allocate from the slab first, with GFP_KERNEL | __GFP_NORETRY,
then fall back to a non-blocking attempt to allocate from the memory
pool.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/internal.h
fs/nfs/pnfs_nfs.c
fs/nfs/write.c
include/linux/nfs_fs.h