1
0
Fork 0

fs/xfs: Fix return code of xfs_break_leased_layouts()

The parens used in the while loop would result in error being assigned
the value 1 rather than the intended errno value.

This is required to return -ETXTBSY from follow on break_layout()
changes.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
alistair/sunxi64-5.4-dsi
Ira Weiny 2019-08-19 18:15:28 -07:00 committed by Darrick J. Wong
parent 5d888b481e
commit b68271609c
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ xfs_break_leased_layouts(
struct xfs_inode *ip = XFS_I(inode);
int error;
while ((error = break_layout(inode, false) == -EWOULDBLOCK)) {
while ((error = break_layout(inode, false)) == -EWOULDBLOCK) {
xfs_iunlock(ip, *iolock);
*did_unlock = true;
error = break_layout(inode, true);