Merge tag 'xfs-4.17-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Apr 2018 20:28:22 +0000 (13:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Apr 2018 20:28:22 +0000 (13:28 -0700)
Pull more xfs updates from Darrick Wong:
 "Most of these are code cleanups, but there are a couple of notable
  use-after-free bug fixes.

  This series has been run through a full xfstests run over the week and
  through a quick xfstests run against this morning's master, with no
  major failures reported.

   - clean up unnecessary function call parameters

   - fix a use-after-free bug when aborting logging intents

   - refactor filestreams state data to avoid use-after-free bug

   - fix incorrect removal of cow extents when truncating extended
     attributes.

   - refactor open-coded __set_page_dirty in favor of using vfs
     function.

   - fix a deadlock when fstrim and fs shutdown race"

* tag 'xfs-4.17-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  Force log to disk before reading the AGF during a fstrim
  Export __set_page_dirty
  xfs: only cancel cow blocks when truncating the data fork
  xfs: non-scrub - remove unused function parameters
  xfs: remove filestream item xfs_inode reference
  xfs: fix intent use-after-free on abort
  xfs: Remove "committed" argument of xfs_dir_ialloc

1  2 
fs/xfs/xfs_iops.c

diff --combined fs/xfs/xfs_iops.c
index 154725b1b813b841c96b7912bcbf8492db2b660d,c45acf0685e3e3e4a8b10342507f068f15c47b30..a3ed3c811dfa4c8291a3a079ee35b37c5e08f318
@@@ -177,7 -177,7 +177,7 @@@ xfs_generic_create
        if (!tmpfile) {
                error = xfs_create(XFS_I(dir), &name, mode, rdev, &ip);
        } else {
-               error = xfs_create_tmpfile(XFS_I(dir), dentry, mode, &ip);
+               error = xfs_create_tmpfile(XFS_I(dir), mode, &ip);
        }
        if (unlikely(error))
                goto out_free_acl;
@@@ -1285,10 -1285,7 +1285,10 @@@ xfs_setup_iops
        case S_IFREG:
                inode->i_op = &xfs_inode_operations;
                inode->i_fop = &xfs_file_operations;
 -              inode->i_mapping->a_ops = &xfs_address_space_operations;
 +              if (IS_DAX(inode))
 +                      inode->i_mapping->a_ops = &xfs_dax_aops;
 +              else
 +                      inode->i_mapping->a_ops = &xfs_address_space_operations;
                break;
        case S_IFDIR:
                if (xfs_sb_version_hasasciici(&XFS_M(inode->i_sb)->m_sb))