When a new directory is allocated, if an error is occurred, we should truncate preallocated dentry pages too.
Signed-off-by: Jaegeuk Kim <jaegeuk....@samsung.com> --- fs/f2fs/dir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index bfcb4ae..daea906c 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -372,6 +372,8 @@ static struct page *init_inode_metadata(struct inode *inode, put_error: f2fs_put_page(page, 1); + if (S_ISDIR(inode->i_mode)) + truncate_blocks(inode, 0); error: remove_inode_page(inode); return ERR_PTR(err); -- 1.8.4.474.g128a96c ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel