Re: [PATCH 1/3] block: Add invalidate_gendisk() helper to invalidate the gendisk

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

 



On Mon, Sep 13, 2021 at 8:32 PM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
>
> On Mon, Sep 13, 2021 at 07:25:55PM +0800, Xie Yongji wrote:
> >
> > +/**
> > + * invalidate_gendisk - invalidate the gendisk
> > + * @disk: the struct gendisk to invalidate
> > + *
> > + * A helper to invalidates the gendisk. It will clean the gendisk's associated
> > + * buffer/page caches and reset its internal states so that the gendisk
> > + * can be reused by the drivers.
> > + *
> > + * Context: can sleep
> > + */
> > +
> > +void invalidate_gendisk(struct gendisk *disk)
>
> No need for the empty line.  Also I wonder if invalidate_disk might be a
> better name - except for del_gendisk we don't really use _gendisk in
> function names at all.
>

Looks good to me.

> > +extern void invalidate_gendisk(struct gendisk *gp);
>
> No need for the extern.  Also I'd name the argument disk, just as in
> the actual implementation.
>

OK.

Thanks,
Yongji



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux