Merge branch 'xfs-misc-fixes-4.6-4' into for-next
authorDave Chinner <david@fromorbit.com>
Tue, 15 Mar 2016 00:44:35 +0000 (11:44 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 15 Mar 2016 00:44:35 +0000 (11:44 +1100)
1  2 
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/xfs_aops.c
fs/xfs/xfs_mount.h

Simple merge
index 75a39a8257ee78a8f7fdf1cb473b5a91f0ec0dd4,eed0bfc4443c293c9db36e32534a1142a801613b..7ba680e572fce603734721d998779b23b4005635
@@@ -1505,22 -1784,15 +1506,23 @@@ xfs_vm_write_failed
                if (block_start >= to)
                        break;
  
 -              if (!buffer_delay(bh))
 +              /*
 +               * Process delalloc and unwritten buffers beyond EOF. We can
 +               * encounter unwritten buffers in the event that a file has
 +               * post-EOF unwritten extents and an extending write happens to
 +               * fail (e.g., an unaligned write that also involves a delalloc
 +               * to the same page).
 +               */
 +              if (!buffer_delay(bh) && !buffer_unwritten(bh))
                        continue;
  
-               if (!buffer_new(bh) && block_offset < i_size_read(inode))
+               if (!xfs_mp_fail_writes(mp) && !buffer_new(bh) &&
+                   block_offset < i_size_read(inode))
                        continue;
  
 -              xfs_vm_kill_delalloc_range(inode, block_offset,
 -                                         block_offset + bh->b_size);
 +              if (buffer_delay(bh))
 +                      xfs_vm_kill_delalloc_range(inode, block_offset,
 +                                                 block_offset + bh->b_size);
  
                /*
                 * This buffer does not contain data anymore. make sure anyone
Simple merge