diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2017-09-01 16:14:28 -0600 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-10-30 12:27:55 +0100 |
commit | 69cc7151ee8055e6bf7241a21211231a1a208abd (patch) | |
tree | a1c3a5fde1456ea7996e09438cf1decd54fa095c /fs/btrfs/ioctl.c | |
parent | 219d33b26ac498ca472a02b9217b4e450474fc90 (diff) | |
download | linux-69cc7151ee8055e6bf7241a21211231a1a208abd.tar.bz2 |
Btrfs: move finish_wait out of the loop
If we're still going to wait after schedule(), we don't have to do
finish_wait() to remove our %wait_queue_entry since prepare_to_wait()
won't add the same %wait_queue_entry twice.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 6c7a49faf4e0..1d4f8a7a128c 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -622,8 +622,8 @@ static void btrfs_wait_for_no_snapshotting_writes(struct btrfs_root *root) if (writers) schedule(); - finish_wait(&root->subv_writers->wait, &wait); } while (writers); + finish_wait(&root->subv_writers->wait, &wait); } static int create_snapshot(struct btrfs_root *root, struct inode *dir, |