diff options
author | Christoph Hellwig <hch@lst.de> | 2018-07-12 07:25:57 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-12 07:25:57 +0200 |
commit | d43801775766972535a0f4b78af65d0c13055e36 (patch) | |
tree | e9181467ed6c2c978d059cf40850caf1605c8318 /fs/xfs/xfs_iomap.c | |
parent | xfs: simplify xfs_aops_discard_page (diff) | |
download | linux-d43801775766972535a0f4b78af65d0c13055e36.tar.xz linux-d43801775766972535a0f4b78af65d0c13055e36.zip |
xfs: move locking into xfs_bmap_punch_delalloc_range
Both callers want the same looking, so do it only once.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_iomap.c')
-rw-r--r-- | fs/xfs/xfs_iomap.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index e08a84d9ee72..10c54fc7d1b4 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -1204,11 +1204,8 @@ xfs_file_iomap_end_delalloc( truncate_pagecache_range(VFS_I(ip), XFS_FSB_TO_B(mp, start_fsb), XFS_FSB_TO_B(mp, end_fsb) - 1); - xfs_ilock(ip, XFS_ILOCK_EXCL); error = xfs_bmap_punch_delalloc_range(ip, start_fsb, end_fsb - start_fsb); - xfs_iunlock(ip, XFS_ILOCK_EXCL); - if (error && !XFS_FORCED_SHUTDOWN(mp)) { xfs_alert(mp, "%s: unable to clean up ino %lld", __func__, ip->i_ino); |