Merge remote-tracking branch 'jk/vfs' into work.misc
[cascardo/linux.git] / fs / btrfs / tree-log.c
index e935035..8a84ebd 100644 (file)
@@ -2867,6 +2867,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
 
        if (log_root_tree->log_transid_committed >= root_log_ctx.log_transid) {
                blk_finish_plug(&plug);
+               list_del_init(&root_log_ctx.list);
                mutex_unlock(&log_root_tree->log_mutex);
                ret = root_log_ctx.log_ret;
                goto out;
@@ -3960,7 +3961,7 @@ static int wait_ordered_extents(struct btrfs_trans_handle *trans,
                         * i_mapping flags, so that the next fsync won't get
                         * an outdated io error too.
                         */
-                       btrfs_inode_check_errors(inode);
+                       filemap_check_errors(inode->i_mapping);
                        *ordered_io_error = true;
                        break;
                }
@@ -4197,7 +4198,7 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans,
         * without writing to the log tree and the fsync must report the
         * file data write error and not commit the current transaction.
         */
-       ret = btrfs_inode_check_errors(inode);
+       ret = filemap_check_errors(inode->i_mapping);
        if (ret)
                ctx->io_err = ret;
 process: