Re: [RFC PATCH 06/35] rbd: Use ceph_databuf for rbd_obj_read_sync()

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

 



Viacheslav Dubeyko <Slava.Dubeyko@xxxxxxx> wrote:

> > +	dbuf = ceph_databuf_req_alloc(1, sizeof(*ondisk), GFP_KERNEL);
> 
> I am slightly worried about such using of ondisk variable. We have garbage as a
> value of ondisk pointer on this step yet. And pointer dereferencing could look
> confusing here. Also, potentially, compiler and static analysis tools could
> complain. I don't see a problem here but anyway I am feeling worried. :)

It's a sizeof() construction.  We do this all the time:

	struct fred *p;

	p = kmalloc(sizeof(*p), GFP_KERNEL);

David






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

  Powered by Linux