rcu: Check both root and current rcu_node when setting up future grace period
[firefly-linux-kernel-4.4.55.git] / fs / xfs / xfs_log.c
index a5f8bd9899d37a811af38a616da44f66d73d399f..292308dede6da566500883ccfb97122adb59b89f 100644 (file)
@@ -1165,7 +1165,7 @@ xlog_iodone(xfs_buf_t *bp)
        /*
         * Race to shutdown the filesystem if we see an error.
         */
-       if (XFS_TEST_ERROR((xfs_buf_geterror(bp)), l->l_mp,
+       if (XFS_TEST_ERROR(bp->b_error, l->l_mp,
                        XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) {
                xfs_buf_ioerror_alert(bp, __func__);
                xfs_buf_stale(bp);
@@ -3952,11 +3952,14 @@ xfs_log_force_umount(
                retval = xlog_state_ioerror(log);
                spin_unlock(&log->l_icloglock);
        }
+
        /*
-        * Wake up everybody waiting on xfs_log_force.
-        * Callback all log item committed functions as if the
-        * log writes were completed.
+        * Wake up everybody waiting on xfs_log_force. Wake the CIL push first
+        * as if the log writes were completed. The abort handling in the log
+        * item committed callback functions will do this again under lock to
+        * avoid races.
         */
+       wake_up_all(&log->l_cilp->xc_commit_wait);
        xlog_state_do_callback(log, XFS_LI_ABORTED, NULL);
 
 #ifdef XFSERRORDEBUG