diff options
| author | Chao Yu <chao2.yu@samsung.com> | 2014-08-03 22:11:17 -0400 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-08-04 16:02:03 -0400 |
| commit | 497a0930bb4bd148451e1af239a082e3916b681b (patch) | |
| tree | 1079d0b9749f7de0e77d0f18269b6235cdf60445 | |
| parent | 002a41cabb5829d59c0337dcb5fa3893e0bb15fd (diff) | |
f2fs: add f2fs_balance_fs for expand_inode_data
This patch adds f2fs_balance_fs in expand_inode_data to avoid allocation failure
with segment.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 2a91a7d1760c..208f1a9bd569 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
| @@ -672,6 +672,8 @@ static int expand_inode_data(struct inode *inode, loff_t offset, | |||
| 672 | loff_t off_start, off_end; | 672 | loff_t off_start, off_end; |
| 673 | int ret = 0; | 673 | int ret = 0; |
| 674 | 674 | ||
| 675 | f2fs_balance_fs(sbi); | ||
| 676 | |||
| 675 | ret = inode_newsize_ok(inode, (len + offset)); | 677 | ret = inode_newsize_ok(inode, (len + offset)); |
| 676 | if (ret) | 678 | if (ret) |
| 677 | return ret; | 679 | return ret; |
