]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: always zero di_flags2 when we free the inode
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 23 Jan 2018 03:19:26 +0000 (19:19 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Jan 2018 15:27:22 +0000 (07:27 -0800)
commitab1636adedd072e9399a43c2704090989d556ca4
treeec1741a6a8e6828c59849849b54ee0d29ee4d30e
parent2f636180cb17faeb67948c9689edd7e60d803f58
xfs: always zero di_flags2 when we free the inode

Always zero the di_flags2 field when we free the inode so that we never
end up with an on-disk record for an unallocated inode that also has the
reflink iflag set.  This is in keeping with the general principle that
only files can have the reflink iflag set, even though we'll zero out
di_flags2 if we ever reallocate the inode.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_inode.c