Re: [PATCH] Btrfs: reset ret in record_one_backref

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

 



On mon, 22 Jul 2013 12:52:35 -0400, Josef Bacik wrote:
> I was getting warnings when running find ./ -type f -exec btrfs fi defrag -f {}
> \; from record_one_backref because ret was set.  Turns out it was because it was
> set to 1 because the search slot didn't come out exact and we never reset it.
> So reset it to 0 right after the search so we don't leak this and get
> uneccessary warnings.  Thanks,
> 
> Signed-off-by: Josef Bacik <jbacik@xxxxxxxxxxxx>

Reviewed-by: Miao Xie <miaox@xxxxxxxxxxxxxx>

> ---
>  fs/btrfs/inode.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index dd05238..a3a6155 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -2132,6 +2132,7 @@ static noinline int record_one_backref(u64 inum, u64 offset, u64 root_id,
>  		WARN_ON(1);
>  		return ret;
>  	}
> +	ret = 0;
>  
>  	while (1) {
>  		cond_resched();
> @@ -2181,8 +2182,6 @@ static noinline int record_one_backref(u64 inum, u64 offset, u64 root_id,
>  		    old->len || extent_offset + num_bytes <=
>  		    old->extent_offset + old->offset)
>  			continue;
> -
> -		ret = 0;
>  		break;
>  	}
>  
> 

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