summaryrefslogtreecommitdiff
path: root/patches.tizen/0469-f2fs-fix-wrong-condition-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches.tizen/0469-f2fs-fix-wrong-condition-check.patch')
-rw-r--r--patches.tizen/0469-f2fs-fix-wrong-condition-check.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/patches.tizen/0469-f2fs-fix-wrong-condition-check.patch b/patches.tizen/0469-f2fs-fix-wrong-condition-check.patch
new file mode 100644
index 00000000000..e4348518e33
--- /dev/null
+++ b/patches.tizen/0469-f2fs-fix-wrong-condition-check.patch
@@ -0,0 +1,43 @@
+From b435b2df80435a620dcaaf627e0c4d082014caa2 Mon Sep 17 00:00:00 2001
+From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
+Date: Tue, 21 May 2013 10:17:56 +0900
+Subject: [PATCH 0469/1302] f2fs: fix wrong condition check
+
+While an orphan inode has zero link_count, f2fs_gc is able to select the inode
+for foreground gc.
+
+- f2fs_gc
+ - do_garbage_collect
+ - gc_data_segment
+ : f2fs_iget is failed
+ : get_valid_blocks() != 0, so that retry
+--> here we got the infinite loop.
+
+This patch resolved this issue.
+
+Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
+Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
+---
+ fs/f2fs/inode.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
+index a18946e..b44a4c1 100644
+--- a/fs/f2fs/inode.c
++++ b/fs/f2fs/inode.c
+@@ -109,12 +109,6 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino)
+ ret = do_read_inode(inode);
+ if (ret)
+ goto bad_inode;
+-
+- if (!sbi->por_doing && inode->i_nlink == 0) {
+- ret = -ENOENT;
+- goto bad_inode;
+- }
+-
+ make_now:
+ if (ino == F2FS_NODE_INO(sbi)) {
+ inode->i_mapping->a_ops = &f2fs_node_aops;
+--
+1.8.3.2
+