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,6 +230,7 @@ xfs_read(
ret = __generic_file_aio_read(iocb, iovp, segs, offset);
xfs_iunlock(ip, XFS_IOLOCK_SHARED);
if (ret > 0)
XFS_STATS_ADD(xfsstats.xs_read_bytes, ret);
if (!invisible)
......
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