Re: [PATCH 4/6] btrfs: make btrfs_free_stale_device() argument optional

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

 



		/*
@@ -637,8 +632,11 @@ static void btrfs_free_stale_device(struct btrfs_device *cur_dev)
  			 * either use mapper or non mapper path throughout.
  			 */
  			rcu_read_lock();
-			not_found = strcmp(rcu_str_deref(dev->name),
-						rcu_str_deref(cur_dev->name));
+			if (cur_dev)
+				not_found = strcmp(rcu_str_deref(dev->name),
+						   rcu_str_deref(cur_dev->name));
+			else
+				not_found = 0;

nit: Perhaps put a proper documentation header at the beginning of the
function detailing this behavior. I.e.

/*
  * btrfs_free_stale_device
  * ....


 Right. Will add.

Thanks, Anand

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