]> granicus.if.org Git - zfs/commit
Retry zfs_znode_alloc() in zfs_mknode()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 24 Mar 2017 01:26:50 +0000 (18:26 -0700)
committerGitHub <noreply@github.com>
Fri, 24 Mar 2017 01:26:50 +0000 (18:26 -0700)
commit8d703987407acfcbd992ba4a7926f2d76ca3779c
treec6f5f253f82729138ee0d8b26f7fd564ce7155d6
parentb25c5b0639e0d2281ccbd3b5766762dc3bebfc02
Retry zfs_znode_alloc() in zfs_mknode()

For historical reasons zfs_mknode() was written such that it could
never fail.  This poses a problem for Linux since zfs_znode_alloc()
could potentually failure due to low memory.  Handle this gracefully
by retrying zfs_znode_alloc() until it succeeds, direct reclaim
will eventually be able to allocate memory.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5535
Closes #5908
module/zfs/zfs_znode.c