Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

Commit 6e7098e

Browse files
chaseyuWendy Yan
authored and
Wendy Yan
committed
f2fs: fix to return correct error number in f2fs_write_begin
Fix the wrong error number in error path of f2fs_write_begin. Signed-off-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 307fc06 commit 6e7098e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/f2fs/data.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -960,8 +960,10 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping,
960960

961961
/* check inline_data */
962962
ipage = get_node_page(sbi, inode->i_ino);
963-
if (IS_ERR(ipage))
963+
if (IS_ERR(ipage)) {
964+
err = PTR_ERR(ipage);
964965
goto unlock_fail;
966+
}
965967

966968
set_new_dnode(&dn, inode, ipage, ipage, 0);
967969

0 commit comments

Comments
 (0)