Skip to content

Commit 994b442

Browse files
Daeho JeongJaegeuk Kim
authored andcommitted
f2fs: allocate node blocks for atomic write block replacement
When a node block is missing for atomic write block replacement, we need to allocate it in advance of the replacement. Signed-off-by: Daeho Jeong <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 591fc34 commit 994b442

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/f2fs/segment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static int __replace_atomic_write_block(struct inode *inode, pgoff_t index,
217217

218218
retry:
219219
set_new_dnode(&dn, inode, NULL, NULL, 0);
220-
err = f2fs_get_dnode_of_data(&dn, index, LOOKUP_NODE_RA);
220+
err = f2fs_get_dnode_of_data(&dn, index, ALLOC_NODE);
221221
if (err) {
222222
if (err == -ENOMEM) {
223223
f2fs_io_schedule_timeout(DEFAULT_IO_TIMEOUT);

0 commit comments

Comments
 (0)