Re: [PATCH 1/2] fs: export sget_dev()

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

 



On Wed, Aug 30, 2023 at 11:38:51AM +0200, Jan Kara wrote:
> On Wed 30-08-23 10:05:57, Christian Brauner wrote:
> > On Wed, Aug 30, 2023 at 08:14:09AM +0200, Christoph Hellwig wrote:
> > > > +struct super_block *sget_dev(struct fs_context *fc, dev_t dev)
> > > 
> > > A kerneldoc comment would probably be useful here.
> > 
> > Added the following in-treep:
> > 
> > diff --git a/fs/super.c b/fs/super.c
> > index 158e093f23c9..19fa906b118a 100644
> > --- a/fs/super.c
> > +++ b/fs/super.c
> > @@ -1388,6 +1388,26 @@ static int super_s_dev_test(struct super_block *s, struct fs_context *fc)
> >                 s->s_dev == *(dev_t *)fc->sget_key;
> >  }
> > 
> > +/**
> > + * sget_dev - Find or create a superblock by device number
> > + * @fc:        Filesystem context.
> > + * @dev: device number
>       ^^^^^^ inconsistent indenting.

Fixed, thanks!

> 
> > + *
> > + * Find or create a superblock using the provided device number that
> > + * will be stored in fc->sget_key.
> > + *
> > + * If an extant superblock is matched, then that will be returned with
> > + * an elevated reference count that the caller must transfer or discard.
> > + *
> > + * If no match is made, a new superblock will be allocated and basic
> > + * initialisation will be performed (s_type, s_fs_info and s_id will be
> > + * set and the set() callback will be invoked), the superblock will be
>       ^^ I guess no point in talking about set() callback when sget_dev()
> has no callback specified. Rather you could mention s_dev as one of
> initialized fields.

Yeah, good point. Done.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux