Skip to content

Commit

Permalink
f2fs: report -ENOENT for unreached data indices
Browse files Browse the repository at this point in the history
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: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Jaegeuk Kim committed Apr 10, 2015
1 parent cff2852 commit 7662916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 (f2fs_has_inline_data(dn->inode) && index) {
err = -EINVAL;
err = -ENOENT;
f2fs_put_page(npage[0], 1);
goto release_out;
}
Expand Down

0 comments on commit 7662916

Please sign in to comment.