Commit 1ca335e9 authored by Stephen Lord's avatar Stephen Lord

Only add bytes read into the stats if we did not get an error

parent 4f517bc1
......@@ -230,7 +230,8 @@ xfs_read(
ret = __generic_file_aio_read(iocb, iovp, segs, offset);
xfs_iunlock(ip, XFS_IOLOCK_SHARED);
XFS_STATS_ADD(xfsstats.xs_read_bytes, ret);
if (ret > 0)
XFS_STATS_ADD(xfsstats.xs_read_bytes, ret);
if (!invisible)
xfs_ichgtime(ip, XFS_ICHGTIME_ACC);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment