Re: [PATCH 05/11] btrfs-progs: btrfs_scan_one_dir not to skip links when /dev/mapper is provided

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

 



On Mon, Jul 15, 2013 at 01:30:51PM +0800, Anand Jain wrote:
> @@ -1048,6 +1049,9 @@ int btrfs_scan_one_dir(char *dirname, int run_ioctl)
>  		return -ENOMEM;
>  	strcpy(pending->name, dirname);
>  
> +	if (!strncmp(dirname, "/dev/mapper", strlen("/dev/mapper")))
> +		skip_link = 0;

This would break if it's called with "/dev/mapper/", I suggest to use
realpath on the dirname argument first. And you can use strcmp.

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