summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2014-08-04 05:55:27 +0200
committerDave Chinner <david@fromorbit.com>2014-08-04 05:55:27 +0200
commit645f9857213476407d8ed1b59619fdff7128d3e6 (patch)
treef48e76ffa8b4af8bfa0c64d54ff96d76b61f6f65 /fs/xfs/xfs_log.c
parentMerge branch 'xfs-bulkstat-refactor' into for-next (diff)
parentxfs: flush both inodes in xfs_swap_extents (diff)
downloadlinux-645f9857213476407d8ed1b59619fdff7128d3e6.tar.xz
linux-645f9857213476407d8ed1b59619fdff7128d3e6.zip
Merge branch 'xfs-misc-fixes-3.17-2' into for-next
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 149a4a575a09..ca4fd5bd8522 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1378,8 +1378,14 @@ xlog_alloc_log(
xlog_get_iclog_buffer_size(mp, log);
+ /*
+ * Use a NULL block for the extra log buffer used during splits so that
+ * it will trigger errors if we ever try to do IO on it without first
+ * having set it up properly.
+ */
error = -ENOMEM;
- bp = xfs_buf_alloc(mp->m_logdev_targp, 0, BTOBB(log->l_iclog_size), 0);
+ bp = xfs_buf_alloc(mp->m_logdev_targp, XFS_BUF_DADDR_NULL,
+ BTOBB(log->l_iclog_size), 0);
if (!bp)
goto out_free_log;