Re: [PATCH 2/2] pnfsd: fix test in nfsd4_find_pnfs_dlm_device

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

 



On Fri, May 28, 2010 at 01:15:21PM -0400, J. Bruce Fields wrote:
> From: Eric Anderle <eanderle@xxxxxxxxx>
> 
> This test is obviously backwards.  Noticed because pnfs_dlm_device was
> allowing us to re-add the same disk multiple times.

But how did getdeviceinfo ever work?

--b.

> 
> Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>
> ---
>  fs/nfsd/nfs4pnfsdlm.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4pnfsdlm.c b/fs/nfsd/nfs4pnfsdlm.c
> index 0351d71..1cf1b69 100644
> --- a/fs/nfsd/nfs4pnfsdlm.c
> +++ b/fs/nfsd/nfs4pnfsdlm.c
> @@ -53,7 +53,7 @@ nfsd4_find_pnfs_dlm_device(char *disk_name)
>  
>  	spin_lock(&dlm_device_list_lock);
>  	list_for_each_entry(dlm_pdev, &dlm_device_list, dlm_dev_list) {
> -		if (memcmp(dlm_pdev->disk_name, disk_name, strlen(disk_name))) {
> +		if (!memcmp(dlm_pdev->disk_name, disk_name, strlen(disk_name))) {
>  			spin_unlock(&dlm_device_list_lock);
>  			return dlm_pdev;
>  		}
> -- 
> 1.7.0.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" 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 USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux