summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_icache.c
diff options
context:
space:
mode:
authorDarrick J. Wong2017-10-18 06:37:32 +0200
committerDarrick J. Wong2017-10-27 00:38:23 +0200
commited438b476b611c67089760037139f93ea8ed41d5 (patch)
tree712423f2605555e63596856b8110887152913f5a /fs/xfs/xfs_icache.c
parentxfs: buffer lru reference count error injection tag (diff)
downloadkernel-qcow2-linux-ed438b476b611c67089760037139f93ea8ed41d5.tar.gz
kernel-qcow2-linux-ed438b476b611c67089760037139f93ea8ed41d5.tar.xz
kernel-qcow2-linux-ed438b476b611c67089760037139f93ea8ed41d5.zip
xfs: return a distinct error code value for IGET_INCORE cache misses
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 <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_icache.c')
-rw-r--r--fs/xfs/xfs_icache.c2
1 files changed, 1 insertions, 1 deletions
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);