From: Darrick J. Wong Date: Wed, 18 Oct 2017 04:37:32 +0000 (-0700) Subject: xfs: return a distinct error code value for IGET_INCORE cache misses X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=61bc71d34a00801657591e142f374794b6dc3548;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git xfs: return a distinct error code value for IGET_INCORE cache misses [ Upstream commit ed438b476b611c67089760037139f93ea8ed41d5 ] For an XFS_IGET_INCORE iget operation, if the inode isn't in the cache, return ENODATA so that we don't confuse it with the pre-existing ENOENT cases (inode is in cache, but freed). Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index 34227115a5d6..43005fbe8b1e 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -610,7 +610,7 @@ again: } else { rcu_read_unlock(); if (flags & XFS_IGET_INCORE) { - error = -ENOENT; + error = -ENODATA; goto out_error_or_again; } XFS_STATS_INC(mp, xs_ig_missed);