On Thu, Feb 26, 2015 at 11:20:23AM +0800, Zhaolei wrote:
> --- a/fs/btrfs/transaction.c
> +++ b/fs/btrfs/transaction.c
> @@ -2068,8 +2068,12 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
>
> kmem_cache_free(btrfs_trans_handle_cachep, trans);
>
> - if (current != root->fs_info->transaction_kthread)
> + if (current != root->fs_info->transaction_kthread) {
> btrfs_run_delayed_iputs(root);
Using a mutex for this kind of synchronization is not entirely correct
though it works.
> + /* make sure that all running delayed iput are done */
> + down_write(&root->fs_info->delayed_iput_sem);
> + up_write(&root->fs_info->delayed_iput_sem);
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html