summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorDaeho Jeong <daehojeong@google.com>2023-04-18 20:42:01 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2023-04-24 21:03:10 +0300
commit994b442b66a4624a2f471aba5cbae37a79213313 (patch)
treebcc7052e3a79970b3212519f7246c553693bd6e1 /fs/f2fs
parent591fc34e1f98b0d7eef4aa3440bfdff3c5a1cadd (diff)
downloadlinux-994b442b66a4624a2f471aba5cbae37a79213313.tar.xz
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 <daehojeong@google.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 641bd8cc54da..6db410f1bb8c 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -217,7 +217,7 @@ static int __replace_atomic_write_block(struct inode *inode, pgoff_t index,
retry:
set_new_dnode(&dn, inode, NULL, NULL, 0);
- err = f2fs_get_dnode_of_data(&dn, index, LOOKUP_NODE_RA);
+ err = f2fs_get_dnode_of_data(&dn, index, ALLOC_NODE);
if (err) {
if (err == -ENOMEM) {
f2fs_io_schedule_timeout(DEFAULT_IO_TIMEOUT);