Explorar o código

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: Jaegeuk Kim <jaegeuk@kernel.org>
Jaegeuk Kim %!s(int64=11) %!d(string=hai) anos
pai
achega
7662916591
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      fs/f2fs/node.c

+ 1 - 1
fs/f2fs/node.c

@@ -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;
 	}