lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20230814105856.pudqvixopjh3hmtn@andromeda> Date: Mon, 14 Aug 2023 12:58:56 +0200 From: Carlos Maiolino <cem@...nel.org> To: Christoph Hellwig <hch@....de> Cc: Al Viro <viro@...iv.linux.org.uk>, Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>, Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>, David Sterba <dsterba@...e.com>, Theodore Ts'o <tytso@....edu>, Andreas Dilger <adilger.kernel@...ger.ca>, Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <chao@...nel.org>, Ryusuke Konishi <konishi.ryusuke@...il.com>, "Darrick J. Wong" <djwong@...nel.org>, Jens Axboe <axboe@...nel.dk>, linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, linux-nilfs@...r.kernel.org, linux-fsdevel@...r.kernel.org, linux-xfs@...r.kernel.org, linux-block@...r.kernel.org Subject: Re: [PATCH 12/12] xfs use fs_holder_ops for the log and RT devices On Wed, Aug 02, 2023 at 05:41:31PM +0200, Christoph Hellwig wrote: > Use the generic fs_holder_ops to shut down the file system when the > log or RT device goes away instead of duplicating the logic. > > Signed-off-by: Christoph Hellwig <hch@....de> > --- > fs/xfs/xfs_super.c | 17 +++-------------- > 1 file changed, 3 insertions(+), 14 deletions(-) Looks good: Reviewed-by: Carlos Maiolino <cmaiolino@...hat.com> Carlos > > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c > index d5042419ed9997..338eba71ff8667 100644 > --- a/fs/xfs/xfs_super.c > +++ b/fs/xfs/xfs_super.c > @@ -377,17 +377,6 @@ xfs_setup_dax_always( > return 0; > } > > -static void > -xfs_bdev_mark_dead( > - struct block_device *bdev) > -{ > - xfs_force_shutdown(bdev->bd_holder, SHUTDOWN_DEVICE_REMOVED); > -} > - > -static const struct blk_holder_ops xfs_holder_ops = { > - .mark_dead = xfs_bdev_mark_dead, > -}; > - > STATIC int > xfs_blkdev_get( > xfs_mount_t *mp, > @@ -396,8 +385,8 @@ xfs_blkdev_get( > { > int error = 0; > > - *bdevp = blkdev_get_by_path(name, BLK_OPEN_READ | BLK_OPEN_WRITE, mp, > - &xfs_holder_ops); > + *bdevp = blkdev_get_by_path(name, BLK_OPEN_READ | BLK_OPEN_WRITE, > + mp->m_super, &fs_holder_ops); > if (IS_ERR(*bdevp)) { > error = PTR_ERR(*bdevp); > xfs_warn(mp, "Invalid device [%s], error=%d", name, error); > @@ -412,7 +401,7 @@ xfs_blkdev_put( > struct block_device *bdev) > { > if (bdev) > - blkdev_put(bdev, mp); > + blkdev_put(bdev, mp->m_super); > } > > STATIC void > -- > 2.39.2 >
Powered by blists - more mailing lists