summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2017-09-01 16:14:28 -0600
committerDavid Sterba <dsterba@suse.com>2017-10-30 12:27:55 +0100
commit69cc7151ee8055e6bf7241a21211231a1a208abd (patch)
treea1c3a5fde1456ea7996e09438cf1decd54fa095c /fs/btrfs/ioctl.c
parent219d33b26ac498ca472a02b9217b4e450474fc90 (diff)
downloadop-kernel-dev-69cc7151ee8055e6bf7241a21211231a1a208abd.zip
op-kernel-dev-69cc7151ee8055e6bf7241a21211231a1a208abd.tar.gz
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 6c7a49f..1d4f8a7 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,
OpenPOWER on IntegriCloud