Re: [PATCH 5/7] super: remove bd_fsfreeze_{mutex,sb}

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

 



On Wed, Sep 27, 2023 at 08:11:11AM -0700, Darrick J. Wong wrote:
> On Wed, Sep 27, 2023 at 03:21:18PM +0200, Christian Brauner wrote:
> > Both bd_fsfreeze_mutex and bd_fsfreeze_sb are now unused and can be
> > removed. Also move bd_fsfreeze_count down to not have it weirdly placed
> > in the middle of the holder fields.
> > 
> > Suggested-by: Jan Kara <jack@xxxxxxx>
> > Suggested-by: Christoph Hellwig <hch@xxxxxx>
> > Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
> > ---
> >  block/bdev.c              | 1 -
> >  include/linux/blk_types.h | 7 ++-----
> >  2 files changed, 2 insertions(+), 6 deletions(-)
> > 
> > diff --git a/block/bdev.c b/block/bdev.c
> > index 3deccd0ffcf2..084855b669f7 100644
> > --- a/block/bdev.c
> > +++ b/block/bdev.c
> > @@ -392,7 +392,6 @@ struct block_device *bdev_alloc(struct gendisk *disk, u8 partno)
> >  	mapping_set_gfp_mask(&inode->i_data, GFP_USER);
> >  
> >  	bdev = I_BDEV(inode);
> > -	mutex_init(&bdev->bd_fsfreeze_mutex);
> >  	spin_lock_init(&bdev->bd_size_lock);
> >  	mutex_init(&bdev->bd_holder_lock);
> >  	bdev->bd_partno = partno;
> > diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
> > index 88e1848b0869..0238236852b7 100644
> > --- a/include/linux/blk_types.h
> > +++ b/include/linux/blk_types.h
> > @@ -56,14 +56,11 @@ struct block_device {
> >  	void *			bd_holder;
> 
> Hmmm.  get_bdev_super from patch 3 now requires that bd_holder is a
> pointer to a struct super_block.  AFAICT it's only called in conjunction

Yeah, it's documented in Documentations/filesystems/porting.rst as of
060e6c7d179e ("porting: document superblock as block device holder")
which tries to explain differences between the old and new world in
detail.



[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