Commit 76629165 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: report -ENOENT for unreached data indices

If inode has inline_data, it should report -ENOENT when accessing out-of-bound
region.
This is used by f2fs_fiemap which treats -ENOENT with no error.
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent cff28521
...@@ -501,7 +501,7 @@ int get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode) ...@@ -501,7 +501,7 @@ int get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode)
/* if inline_data is set, should not report any block indices */ /* if inline_data is set, should not report any block indices */
if (f2fs_has_inline_data(dn->inode) && index) { if (f2fs_has_inline_data(dn->inode) && index) {
err = -EINVAL; err = -ENOENT;
f2fs_put_page(npage[0], 1); f2fs_put_page(npage[0], 1);
goto release_out; goto release_out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment