Re: [PATCH] Btrfs: protect conditions within root->log_mutex while waiting

2017-09-06 Thread David Sterba
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 Bo Reviewed-by: David Sterba

[PATCH] Btrfs: protect conditions within root->log_mutex while waiting

2017-09-01 Thread Liu Bo
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(-)