Re: [PATCH] Btrfs: wait on async pages when shrinking delalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +		if (atomic_read(&root->fs_info->async_delalloc_pages))
> +			wait_event(root->fs_info->async_submit_wait,
> +			  !atomic_read(&root->fs_info->async_delalloc_pages));

The very first thing wait_event_*() family does is test the condition.
You don't need to guard them with an inverse copy of the condition.
Just call them directly and they'll do the right thing and bail cheaply
when the condition is already true.

- z
--
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


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux