summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_bmap_util.h
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2017-01-28 07:22:55 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-08 07:30:30 (GMT)
commit798b1dc5cbdfbbb3ac0d45177a1fc1dd511e3469 (patch)
tree920b437caca55d7e992381e5a83f94cd00418276 /fs/xfs/xfs_bmap_util.h
parent08a2a26816825b2724fa6e2616df716b31e4a582 (diff)
downloadlinux-798b1dc5cbdfbbb3ac0d45177a1fc1dd511e3469.tar.xz
xfs: pull up iolock from xfs_free_eofblocks()
commit a36b926180cda375ac2ec89e1748b47137cfc51c upstream. xfs_free_eofblocks() requires the IOLOCK_EXCL lock, but is called from different contexts where the lock may or may not be held. The need_iolock parameter exists for this reason, to indicate whether xfs_free_eofblocks() must acquire the iolock itself before it can proceed. This is ugly and confusing. Simplify the semantics of xfs_free_eofblocks() to require the caller to acquire the iolock appropriately and kill the need_iolock parameter. While here, the mp param can be removed as well as the xfs_mount is accessible from the xfs_inode structure. This patch does not change behavior. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.h')
-rw-r--r--fs/xfs/xfs_bmap_util.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_bmap_util.h b/fs/xfs/xfs_bmap_util.h
index 68a621a..f100539 100644
--- a/fs/xfs/xfs_bmap_util.h
+++ b/fs/xfs/xfs_bmap_util.h
@@ -63,8 +63,7 @@ int xfs_insert_file_space(struct xfs_inode *, xfs_off_t offset,
/* EOF block manipulation functions */
bool xfs_can_free_eofblocks(struct xfs_inode *ip, bool force);
-int xfs_free_eofblocks(struct xfs_mount *mp, struct xfs_inode *ip,
- bool need_iolock);
+int xfs_free_eofblocks(struct xfs_inode *ip);
int xfs_swap_extents(struct xfs_inode *ip, struct xfs_inode *tip,
struct xfs_swapext *sx);