Merge tag 'libnvdimm-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdim...
[platform/kernel/linux-rpi.git] / fs / xfs / xfs_iomap.c
index 18077e2..33eb4fb 100644 (file)
@@ -34,6 +34,7 @@
 #include "xfs_error.h"
 #include "xfs_trans.h"
 #include "xfs_trans_space.h"
+#include "xfs_inode_item.h"
 #include "xfs_iomap.h"
 #include "xfs_trace.h"
 #include "xfs_icache.h"
@@ -1089,6 +1090,10 @@ xfs_file_iomap_begin(
                trace_xfs_iomap_found(ip, offset, length, 0, &imap);
        }
 
+       if (xfs_ipincount(ip) && (ip->i_itemp->ili_fsync_fields
+                               & ~XFS_ILOG_TIMESTAMP))
+               iomap->flags |= IOMAP_F_DIRTY;
+
        xfs_bmbt_to_iomap(ip, iomap, &imap);
 
        if (shared)