Skip to content

Commit 2bd3fa7

Browse files
Christoph Hellwigdjwong
authored andcommitted
xfs: fix a missing unlock on error in xfs_fs_map_blocks
We also need to drop the iolock when invalidate_inode_pages2 fails, not only on all other error or successful cases. Fixes: 5278511 ("xfs: implement pNFS export operations") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
1 parent 54e9b09 commit 2bd3fa7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/xfs/xfs_pnfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ xfs_fs_map_blocks(
134134
goto out_unlock;
135135
error = invalidate_inode_pages2(inode->i_mapping);
136136
if (WARN_ON_ONCE(error))
137-
return error;
137+
goto out_unlock;
138138

139139
end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + length);
140140
offset_fsb = XFS_B_TO_FSBT(mp, offset);

0 commit comments

Comments
 (0)