diff options
author | Jeff Liu <jeff.liu@oracle.com> | 2012-02-09 01:42:22 -0500 |
---|---|---|
committer | Joel Becker <jlbec@evilplan.org> | 2012-07-04 02:27:16 -0400 |
commit | 65622e647bfff3ed89f95576ec120693ed4085a6 (patch) | |
tree | a9a2472e34a73ffc4d6b3f9adebd42ff8c329153 /fs/ocfs2 | |
parent | a75e9ccabd925d16954739bd977c54695c9310d0 (diff) |
ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed.
Hello,
Since ENXIO only means "offset beyond EOF" for SEEK_DATA/SEEK_HOLE,
Hence we should return the internal error unchanged if ocfs2_inode_lock() or
ocfs2_get_clusters_nocache() call failed rather than ENXIO.
Otherwise, it will confuse the user applications when they trying to understand the root cause.
Thanks Dave for pointing this out.
Thanks,
-Jeff
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/extent_map.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c index 2f5b92ef0e53..70b5863a2d64 100644 --- a/fs/ocfs2/extent_map.c +++ b/fs/ocfs2/extent_map.c | |||
@@ -923,8 +923,6 @@ out_unlock: | |||
923 | 923 | ||
924 | ocfs2_inode_unlock(inode, 0); | 924 | ocfs2_inode_unlock(inode, 0); |
925 | out: | 925 | out: |
926 | if (ret && ret != -ENXIO) | ||
927 | ret = -ENXIO; | ||
928 | return ret; | 926 | return ret; |
929 | } | 927 | } |
930 | 928 | ||