]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: allow xfs_lock_two_inodes to take different EXCL/SHARED modes
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Jan 2018 23:27:33 +0000 (15:27 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Jan 2018 15:27:23 +0000 (07:27 -0800)
commita02974f6b5141cd65f30eb16454f454a2e970829
tree5ab9c30472ad7bff9ec2ab665ab16ee4f099e76d
parentf6938aa8f7a2f4bfe55f1057cb9b328730ac2eb1
xfs: allow xfs_lock_two_inodes to take different EXCL/SHARED modes

Refactor xfs_lock_two_inodes to take separate locking modes for each
inode.  Specifically, this enables us to take a SHARED lock on one inode
and an EXCL lock on the other.  The lock class (MMAPLOCK/ILOCK) must be
the same for each inode.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_reflink.c