diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-28 16:27:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-28 16:27:23 -0400 |
commit | 02a2b05395dde2f49e7777b67b51a5fbc6606943 (patch) | |
tree | 5d1aceee6e5a987772db092b27c49be67360fdb0 /fs/xfs/xfs_iomap.c | |
parent | e49aa15ef6c179f69e5578a271801f31a09e9a3f (diff) | |
parent | 5e5c943c1f257c2b3424fc3f8a7b18570152dab3 (diff) |
Merge tag 'xfs-4.14-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs fixes from Darrick Wong:
- fix various problems with the copy-on-write extent maps getting freed
at the wrong time
- fix printk format specifier problems
- report zeroing operation outcomes instead of dropping them on the
floor
- fix some crashes when dio operations partially fail
- fix a race condition between unwritten extent conversion & dio read
- fix some incorrect tests in the inode log item processing
- correct the delayed allocation space reservations on rmap filesystems
- fix some problems checking for dax support
* tag 'xfs-4.14-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
xfs: revert "xfs: factor rmap btree size into the indlen calculations"
xfs: Capture state of the right inode in xfs_iflush_done
xfs: perag initialization should only touch m_ag_max_usable for AG 0
xfs: update i_size after unwritten conversion in dio completion
iomap_dio_rw: Allocate AIO completion queue before submitting dio
xfs: validate bdev support for DAX inode flag
xfs: remove redundant re-initialization of total_nr_pages
xfs: Output warning message when discard option was enabled even though the device does not support discard
xfs: report zeroed or not correctly in xfs_zero_range()
xfs: kill meaningless variable 'zero'
fs/xfs: Use %pS printk format for direct addresses
xfs: evict CoW fork extents when performing finsert/fcollapse
xfs: don't unconditionally clear the reflink flag on zero-block files
Diffstat (limited to 'fs/xfs/xfs_iomap.c')
-rw-r--r-- | fs/xfs/xfs_iomap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index a1909bc064e9..f179bdf1644d 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c | |||
@@ -829,7 +829,8 @@ int | |||
829 | xfs_iomap_write_unwritten( | 829 | xfs_iomap_write_unwritten( |
830 | xfs_inode_t *ip, | 830 | xfs_inode_t *ip, |
831 | xfs_off_t offset, | 831 | xfs_off_t offset, |
832 | xfs_off_t count) | 832 | xfs_off_t count, |
833 | bool update_isize) | ||
833 | { | 834 | { |
834 | xfs_mount_t *mp = ip->i_mount; | 835 | xfs_mount_t *mp = ip->i_mount; |
835 | xfs_fileoff_t offset_fsb; | 836 | xfs_fileoff_t offset_fsb; |
@@ -840,6 +841,7 @@ xfs_iomap_write_unwritten( | |||
840 | xfs_trans_t *tp; | 841 | xfs_trans_t *tp; |
841 | xfs_bmbt_irec_t imap; | 842 | xfs_bmbt_irec_t imap; |
842 | struct xfs_defer_ops dfops; | 843 | struct xfs_defer_ops dfops; |
844 | struct inode *inode = VFS_I(ip); | ||
843 | xfs_fsize_t i_size; | 845 | xfs_fsize_t i_size; |
844 | uint resblks; | 846 | uint resblks; |
845 | int error; | 847 | int error; |
@@ -899,7 +901,8 @@ xfs_iomap_write_unwritten( | |||
899 | i_size = XFS_FSB_TO_B(mp, offset_fsb + count_fsb); | 901 | i_size = XFS_FSB_TO_B(mp, offset_fsb + count_fsb); |
900 | if (i_size > offset + count) | 902 | if (i_size > offset + count) |
901 | i_size = offset + count; | 903 | i_size = offset + count; |
902 | 904 | if (update_isize && i_size > i_size_read(inode)) | |
905 | i_size_write(inode, i_size); | ||
903 | i_size = xfs_new_eof(ip, i_size); | 906 | i_size = xfs_new_eof(ip, i_size); |
904 | if (i_size) { | 907 | if (i_size) { |
905 | ip->i_d.di_size = i_size; | 908 | ip->i_d.di_size = i_size; |