summaryrefslogtreecommitdiff
path: root/patches.tizen/0480-f2fs-iput-only-if-whole-data-blocks-are-flushed.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches.tizen/0480-f2fs-iput-only-if-whole-data-blocks-are-flushed.patch')
-rw-r--r--patches.tizen/0480-f2fs-iput-only-if-whole-data-blocks-are-flushed.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/patches.tizen/0480-f2fs-iput-only-if-whole-data-blocks-are-flushed.patch b/patches.tizen/0480-f2fs-iput-only-if-whole-data-blocks-are-flushed.patch
new file mode 100644
index 00000000000..5c4560b39af
--- /dev/null
+++ b/patches.tizen/0480-f2fs-iput-only-if-whole-data-blocks-are-flushed.patch
@@ -0,0 +1,43 @@
+From 7729117496e64b356ecdb03d5f3fd832ba033ebc Mon Sep 17 00:00:00 2001
+From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
+Date: Mon, 27 May 2013 10:32:01 +0900
+Subject: [PATCH 0480/1302] f2fs: iput only if whole data blocks are flushed
+
+If there remains some unwritten blocks from the recovery, we should not call
+iput on that directory inode.
+Otherwise, we can loose some dentry blocks after the recovery.
+
+Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
+Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
+---
+ fs/f2fs/checkpoint.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
+index 01ddc91..0d3701d 100644
+--- a/fs/f2fs/checkpoint.c
++++ b/fs/f2fs/checkpoint.c
+@@ -501,8 +501,10 @@ void remove_dirty_dir_inode(struct inode *inode)
+ return;
+
+ spin_lock(&sbi->dir_inode_lock);
+- if (atomic_read(&F2FS_I(inode)->dirty_dents))
+- goto out;
++ if (atomic_read(&F2FS_I(inode)->dirty_dents)) {
++ spin_unlock(&sbi->dir_inode_lock);
++ return;
++ }
+
+ list_for_each(this, head) {
+ struct dir_inode_entry *entry;
+@@ -516,7 +518,6 @@ void remove_dirty_dir_inode(struct inode *inode)
+ break;
+ }
+ }
+-out:
+ spin_unlock(&sbi->dir_inode_lock);
+
+ /* Only from the recovery routine */
+--
+1.8.3.2
+