Skip to content

Commit b682716

Browse files
weiny2djwong
authored andcommitted
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 <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 5d888b4 commit b682716

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xfs/xfs_pnfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ xfs_break_leased_layouts(
3232
struct xfs_inode *ip = XFS_I(inode);
3333
int error;
3434

35-
while ((error = break_layout(inode, false) == -EWOULDBLOCK)) {
35+
while ((error = break_layout(inode, false)) == -EWOULDBLOCK) {
3636
xfs_iunlock(ip, *iolock);
3737
*did_unlock = true;
3838
error = break_layout(inode, true);

0 commit comments

Comments
 (0)