Re: [PATCH] ceph: initialize pathbase in the !dentry case in encode_caps_cb()

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

 



On 08/09/2016 09:43 AM, Ilya Dryomov wrote:
> pathbase is the base inode; set it to 0 if we've got no path.
> 
> Coverity-id: 146348
> Signed-off-by: Ilya Dryomov <idryomov@xxxxxxxxx>

I'm surprised the compiler didn't complain about this.

Reviewed-by: Alex Elder <elder@xxxxxxxxxx>

> ---
>  fs/ceph/mds_client.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index fa59a85226b2..f72d4ae303b2 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -2759,6 +2759,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
>  	} else {
>  		path = NULL;
>  		pathlen = 0;
> +		pathbase = 0;
>  	}
>  
>  	spin_lock(&ci->i_ceph_lock);
> 

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux