]> asedeno.scripts.mit.edu Git - linux.git/commit
xfs: initialize iomap->flags in xfs_bmbt_to_iomap
authorChristoph Hellwig <hch@lst.de>
Thu, 17 Oct 2019 20:12:02 +0000 (13:12 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 21 Oct 2019 15:51:59 +0000 (08:51 -0700)
commit2492a606b3d24ed901203bd4db19f46d112811c7
treed6ea4d8307d72f325afdeafe1ae385014b56d4a3
parent7684e2c4384d5d1f884b01ab8bff2369e4db0bff
xfs: initialize iomap->flags in xfs_bmbt_to_iomap

Currently we don't overwrite the flags field in the iomap in
xfs_bmbt_to_iomap.  This works fine with 0-initialized iomaps on stack,
but is harmful once we want to be able to reuse an iomap in the
writeback code.  Replace the shared parameter with a set of initial
flags an thus ensures the flags field is always reinitialized.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_iomap.c
fs/xfs/xfs_iomap.h
fs/xfs/xfs_pnfs.c