Re: [PATCH] Btrfs: protect conditions within root->log_mutex while waiting
On Fri, Sep 01, 2017 at 04:14:30PM -0600, Liu Bo wrote: > Both wait_for_commit() and wait_for_writer() are checking the > condition out of the mutex lock. > > This refactors code a bit to be lock safe. > > Signed-off-by: Liu BoReviewed-by: David Sterba
[PATCH] Btrfs: protect conditions within root->log_mutex while waiting
Both wait_for_commit() and wait_for_writer() are checking the condition out of the mutex lock. This refactors code a bit to be lock safe. Signed-off-by: Liu Bo--- fs/btrfs/tree-log.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-)