xfs: check inode reflink flag before calling reflink functions
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 10 Oct 2016 05:47:32 +0000 (16:47 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 10 Oct 2016 05:47:32 +0000 (16:47 +1100)
commit63646fc58d666f149b85ccf470bfc1576a779d4c
treedc640908f7a21bf0f81f0b3e51a05d5f583e9ec1
parent1f08af52e7c981e9877796a2d90b0e0f08666945
xfs: check inode reflink flag before calling reflink functions

There are a couple of places where we don't check the inode's
reflink flag before calling into the reflink code.  Fix those,
and add some asserts so we don't make this mistake again.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_reflink.c
fs/xfs/xfs_super.c