2024-02-26 23:28:42

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the vfs-brauner tree with the xfs tree

Hi all,

Today's linux-next merge of the vfs-brauner tree got a conflict in:

fs/xfs/xfs_buf.c

between commits:

d4c75a1b40cd ("xfs: convert remaining kmem_free() to kfree()")
5076a6040ca1 ("xfs: support in-memory buffer cache targets")

from the xfs tree and commit:

1b9e2d90141c ("xfs: port block device access to files")

from the vfs-brauner tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc fs/xfs/xfs_buf.c
index 7fc26e64368d,01b41fabbe3c..000000000000
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@@ -2030,8 -1951,9 +2030,8 @@@ xfs_free_buftarg
fs_put_dax(btp->bt_daxdev, btp->bt_mount);
/* the main block device is closed by kill_block_super */
if (btp->bt_bdev != btp->bt_mount->m_super->s_bdev)
- bdev_release(btp->bt_bdev_handle);
+ fput(btp->bt_bdev_file);
-
- kmem_free(btp);
+ kfree(btp);
}

int
@@@ -2095,20 -1994,20 +2095,20 @@@ out_destroy_lru
struct xfs_buftarg *
xfs_alloc_buftarg(
struct xfs_mount *mp,
- struct bdev_handle *bdev_handle)
+ struct file *bdev_file)
{
- xfs_buftarg_t *btp;
+ struct xfs_buftarg *btp;
const struct dax_holder_operations *ops = NULL;

#if defined(CONFIG_FS_DAX) && defined(CONFIG_MEMORY_FAILURE)
ops = &xfs_dax_holder_operations;
#endif
- btp = kmem_zalloc(sizeof(*btp), KM_NOFS);
+ btp = kzalloc(sizeof(*btp), GFP_KERNEL | __GFP_NOFAIL);

btp->bt_mount = mp;
- btp->bt_bdev_handle = bdev_handle;
- btp->bt_dev = bdev_handle->bdev->bd_dev;
- btp->bt_bdev = bdev_handle->bdev;
+ btp->bt_bdev_file = bdev_file;
+ btp->bt_bdev = file_bdev(bdev_file);
+ btp->bt_dev = btp->bt_bdev->bd_dev;
btp->bt_daxdev = fs_dax_get_by_bdev(btp->bt_bdev, &btp->bt_dax_part_off,
mp, ops);


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2024-02-27 08:44:52

by Chandan Babu R

[permalink] [raw]
Subject: Re: linux-next: manual merge of the vfs-brauner tree with the xfs tree

On Tue, Feb 27, 2024 at 10:28:27 AM +1100, Stephen Rothwell wrote:
> [[PGP Signed Part:No public key for 015042F34957D06C created at 2024-02-27T04:58:27+0530 using RSA]]
> Hi all,
>
> Today's linux-next merge of the vfs-brauner tree got a conflict in:
>
> fs/xfs/xfs_buf.c
>
> between commits:
>
> d4c75a1b40cd ("xfs: convert remaining kmem_free() to kfree()")
> 5076a6040ca1 ("xfs: support in-memory buffer cache targets")
>
> from the xfs tree and commit:
>
> 1b9e2d90141c ("xfs: port block device access to files")
>
> from the vfs-brauner tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

The resolution looks good to me. Thanks for fixing it up.

--
Chandan