summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/inode.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-09-09 16:59:39 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2016-09-13 13:02:29 -0700
commite8ea9b3d7e278d2ef4b60e703f780ceee70cb331 (patch)
tree2ec0fd1ad038bb20032706ed8bc66552d5df9fdb /fs/f2fs/inode.c
parentf4702d61eb53466251eeb677f9784e047e1caf0c (diff)
downloadop-kernel-dev-e8ea9b3d7e278d2ef4b60e703f780ceee70cb331.zip
op-kernel-dev-e8ea9b3d7e278d2ef4b60e703f780ceee70cb331.tar.gz
f2fs: avoid ENOMEM during roll-forward recovery
This patch gives another chances during roll-forward recovery regarding to -ENOMEM. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r--fs/f2fs/inode.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 9ac5efc..ac4daa5 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -11,6 +11,7 @@
#include <linux/fs.h>
#include <linux/f2fs_fs.h>
#include <linux/buffer_head.h>
+#include <linux/backing-dev.h>
#include <linux/writeback.h>
#include "f2fs.h"
@@ -234,6 +235,20 @@ bad_inode:
return ERR_PTR(ret);
}
+struct inode *f2fs_iget_retry(struct super_block *sb, unsigned long ino)
+{
+ struct inode *inode;
+retry:
+ inode = f2fs_iget(sb, ino);
+ if (IS_ERR(inode)) {
+ if (PTR_ERR(inode) == -ENOMEM) {
+ congestion_wait(BLK_RW_ASYNC, HZ/50);
+ goto retry;
+ }
+ }
+ return inode;
+}
+
int update_inode(struct inode *inode, struct page *node_page)
{
struct f2fs_inode *ri;
OpenPOWER on IntegriCloud