[Ocfs2-devel] [PATCH] ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed.
Sunil Mushran
sunil.mushran at oracle.com
Thu Feb 9 09:43:24 PST 2012
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
On 02/08/2012 10:42 PM, Jeff Liu wrote:
> 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 at fromorbit.com>
> Signed-off-by: Jie Liu<jeff.liu at oracle.com>
>
> ---
> 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 2f5b92e..70b5863 100644
> --- a/fs/ocfs2/extent_map.c
> +++ b/fs/ocfs2/extent_map.c
> @@ -923,8 +923,6 @@ out_unlock:
>
> ocfs2_inode_unlock(inode, 0);
> out:
> - if (ret&& ret != -ENXIO)
> - ret = -ENXIO;
> return ret;
> }
>
More information about the Ocfs2-devel
mailing list