linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/5] f2fs: move f2fs_balance_fs to correct place in unlink
@ 2013-03-02  3:41 Namjae Jeon
  2013-03-03  4:34 ` Jaegeuk Kim
  0 siblings, 1 reply; 5+ messages in thread
From: Namjae Jeon @ 2013-03-02  3:41 UTC (permalink / raw)
  To: jaegeuk.kim
  Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel, Namjae Jeon,
	Namjae Jeon, Amit Sahrawat

From: Namjae Jeon <namjae.jeon@samsung.com>

Actual dirty of pages will occur in f2fs_delete_entry so move the
f2fs_balance_fs just before deletion.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
---
 fs/f2fs/namei.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 1a49b88..eaa86f5 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -223,8 +223,6 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
 	struct page *page;
 	int err = -ENOENT;
 
-	f2fs_balance_fs(sbi);
-
 	de = f2fs_find_entry(dir, &dentry->d_name, &page);
 	if (!de)
 		goto fail;
@@ -236,6 +234,8 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
 		goto fail;
 	}
 
+	f2fs_balance_fs(sbi);
+
 	f2fs_delete_entry(de, page, inode);
 
 	/* In order to evict this inode,  we set it dirty */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-08  4:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-02  3:41 [PATCH 3/5] f2fs: move f2fs_balance_fs to correct place in unlink Namjae Jeon
2013-03-03  4:34 ` Jaegeuk Kim
2013-03-04  6:10   ` Namjae Jeon
2013-03-08  2:33     ` Jaegeuk Kim
2013-03-08  4:13       ` Namjae Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).