]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: introduce a new xfs_inode_has_cow_data helper
authorChristoph Hellwig <hch@lst.de>
Tue, 17 Jul 2018 23:51:51 +0000 (16:51 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 30 Jul 2018 14:57:48 +0000 (07:57 -0700)
commit810b7f7fd8bc2ebbb355cce1a65643307e93f0d2
treed9f2de99b862d7723dd848e7bc84c112de68f247
parentea7943008e862adee39e3b8b9eb1f9444df1ddb9
xfs: introduce a new xfs_inode_has_cow_data helper

We have a few places that already check if an inode has actual data in
the COW fork to avoid work on reflink inodes that do not actually have
outstanding COW blocks.  There are a few more places that can avoid
working if doing the same check, so add a documented helper for this
condition and use it in all places where it makes sense.

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>
fs/xfs/xfs_aops.c
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_icache.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_reflink.c