Skip to content

Commit

Permalink
ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if oc…
Browse files Browse the repository at this point in the history
…fs2_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>
  • Loading branch information
Jeff Liu authored and Joel Becker committed Jul 4, 2012
1 parent a75e9cc commit 65622e6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/ocfs2/extent_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,6 @@ int ocfs2_seek_data_hole_offset(struct file *file, loff_t *offset, int origin)

ocfs2_inode_unlock(inode, 0);
out:
if (ret && ret != -ENXIO)
ret = -ENXIO;
return ret;
}

Expand Down

0 comments on commit 65622e6

Please sign in to comment.