f2fs: should not truncate any inline_dentry
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 16 Oct 2014 19:24:14 +0000 (12:24 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Nov 2014 00:07:34 +0000 (16:07 -0800)
If the inode has inline_dentry, we should not truncate any block indices.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c

index d054e0ebfe240d40f4d44ec0cd592825f4acc149..402e38185b8c808971b9556e8cb89870b9cdd9e5 100644 (file)
@@ -471,7 +471,7 @@ int truncate_blocks(struct inode *inode, u64 from, bool lock)
 
        trace_f2fs_truncate_blocks_enter(inode, from);
 
-       if (f2fs_has_inline_data(inode))
+       if (f2fs_has_inline_data(inode) || f2fs_has_inline_dentry(inode))
                goto done;
 
        free_from = (pgoff_t)