]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
xfs: pull up iolock from xfs_free_eofblocks()
authorBrian Foster <bfoster@redhat.com>
Sat, 28 Jan 2017 07:22:55 +0000 (23:22 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:11:09 +0000 (10:11 +0200)
commita71eaa387bdff26ac0486a990bcaa9429a3e7b80
treed2d15fb52209614f353a63fd54ddfb99e45e5c16
parent26bad82ef44aa54c250046b77246ce7f1833573d
xfs: pull up iolock from xfs_free_eofblocks()

BugLink: http://bugs.launchpad.net/bugs/1681875
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_bmap_util.h
fs/xfs/xfs_icache.c
fs/xfs/xfs_inode.c