提交 d6638ae2 编写于 作者: A Andrew Dahl 提交者: Ben Myers

xfs: reverse the check on XFS_IOC_ZERO_RANGE

Reversing the check on XFS_IOC_ZERO_RANGE.

Range should be zeroed if the start is less than or equal to the end.
Signed-off-by: NAndrew Dahl <adahl@sgi.com>
Reviewed-by: NMark Tinguely <tinguely@sgi.com>
Signed-off-by: NBen Myers <bpm@sgi.com>
上级 f5b8911b
......@@ -2188,7 +2188,7 @@ xfs_change_file_space(
case XFS_IOC_ZERO_RANGE:
prealloc_type |= XFS_BMAPI_CONVERT;
end = round_down(startoffset + bf->l_len, PAGE_SIZE) - 1;
if (startoffset > end)
if (startoffset <= end)
truncate_pagecache_range(VFS_I(ip), startoffset, end);
/* FALLTHRU */
case XFS_IOC_RESVSP:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册