diff options
Diffstat (limited to 'fs/xfs/xfs_iomap.c')
-rw-r--r-- | fs/xfs/xfs_iomap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 3282575e2df4..6320aca39f39 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c | |||
@@ -655,6 +655,7 @@ xfs_iomap_write_allocate( | |||
655 | unsigned int *cow_seq) | 655 | unsigned int *cow_seq) |
656 | { | 656 | { |
657 | xfs_mount_t *mp = ip->i_mount; | 657 | xfs_mount_t *mp = ip->i_mount; |
658 | struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, whichfork); | ||
658 | xfs_fileoff_t offset_fsb, last_block; | 659 | xfs_fileoff_t offset_fsb, last_block; |
659 | xfs_fileoff_t end_fsb, map_start_fsb; | 660 | xfs_fileoff_t end_fsb, map_start_fsb; |
660 | xfs_filblks_t count_fsb; | 661 | xfs_filblks_t count_fsb; |
@@ -768,7 +769,7 @@ xfs_iomap_write_allocate( | |||
768 | goto error0; | 769 | goto error0; |
769 | 770 | ||
770 | if (whichfork == XFS_COW_FORK) | 771 | if (whichfork == XFS_COW_FORK) |
771 | *cow_seq = XFS_IFORK_PTR(ip, whichfork)->if_seq; | 772 | *cow_seq = READ_ONCE(ifp->if_seq); |
772 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | 773 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
773 | } | 774 | } |
774 | 775 | ||