Re: [PATCH 11/16] btrfs: kill btrfs_fs_info::volume_mutex

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

 





@@ -4569,8 +4560,10 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg)
  		/* this is either (2) or (3) */
  		if (!atomic_read(&fs_info->balance_running)) {
  			mutex_unlock(&fs_info->balance_mutex);
-			if (!mutex_trylock(&fs_info->volume_mutex))
-				goto again;


+			/*
+			 * Lock released to allow other waiters to continue,
+			 * we'll reexamine the status again.
+			 */

 I wonder if there was any case where performing the unlock and lock
 sequence on the balance_mutex has helped?
 Otherwise IMO we can clean this up as well. It looks like this sequence
 was needed only to acquire the volume_mutex.

Thanks, Anand


  			mutex_lock(&fs_info->balance_mutex);
if (fs_info->balance_ctl &&

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