f2fs: don't cache nat entry if out of memory
authorChao Yu <yuchao0@huawei.com>
Tue, 13 Dec 2016 10:54:59 +0000 (18:54 +0800)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 3 Oct 2017 13:37:14 +0000 (13:37 +0000)
commit1b05b5e173183cfdfc8791c34f04e8de2edb42f7
tree6e1a47ebd30040a1ab7c846871a4c9fd9d14c2d0
parent2ed473dc9155c4e031cefdb75c6edfc3d4a42817
f2fs: don't cache nat entry if out of memory

commit 5c9e418436f3445d7cc4f3ba2964f231a4b33f17 upstream.

If we run out of memory, in cache_nat_entry, it's better to avoid loop
for allocating memory to cache nat entry, so in low memory scenario, for
read path of node block, I expect this can avoid unneeded latency.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/node.c