public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the vfs-brauner tree with the xfs tree
@ 2023-08-22 23:38 Stephen Rothwell
  2023-08-23  4:44 ` Darrick J. Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2023-08-22 23:38 UTC (permalink / raw)
  To: Christian Brauner, Darrick J. Wong, David Chinner
  Cc: Christoph Hellwig, linux-xfs, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1985 bytes --]

Hi all,

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

  fs/xfs/xfs_super.c

between commit:

  a76dba3b248c ("xfs: create scaffolding for creating debugfs entries")

from the xfs tree and commit:

  35a93b148b03 ("xfs: close the external block devices in xfs_mount_free")

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_super.c
index 09638e8fb4ee,c79eac048456..000000000000
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@@ -760,7 -772,17 +774,18 @@@ static voi
  xfs_mount_free(
  	struct xfs_mount	*mp)
  {
+ 	/*
+ 	 * Free the buftargs here because blkdev_put needs to be called outside
+ 	 * of sb->s_umount, which is held around the call to ->put_super.
+ 	 */
+ 	if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp)
+ 		xfs_free_buftarg(mp->m_logdev_targp);
+ 	if (mp->m_rtdev_targp)
+ 		xfs_free_buftarg(mp->m_rtdev_targp);
+ 	if (mp->m_ddev_targp)
+ 		xfs_free_buftarg(mp->m_ddev_targp);
+ 
 +	debugfs_remove(mp->m_debugfs);
  	kfree(mp->m_rtname);
  	kfree(mp->m_logname);
  	kmem_free(mp);
@@@ -1538,18 -1537,11 +1556,18 @@@ xfs_fs_fill_super
  
  	error = xfs_open_devices(mp);
  	if (error)
- 		goto out_free_names;
+ 		return error;
  
 +	if (xfs_debugfs) {
 +		mp->m_debugfs = xfs_debugfs_mkdir(mp->m_super->s_id,
 +						  xfs_debugfs);
 +	} else {
 +		mp->m_debugfs = NULL;
 +	}
 +
  	error = xfs_init_mount_workqueues(mp);
  	if (error)
- 		goto out_close_devices;
+ 		goto out_shutdown_devices;
  
  	error = xfs_init_percpu_counters(mp);
  	if (error)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread
* linux-next: manual merge of the vfs-brauner tree with the xfs tree
@ 2024-02-26 23:28 Stephen Rothwell
  2024-02-27  8:44 ` Chandan Babu R
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2024-02-26 23:28 UTC (permalink / raw)
  To: Christian Brauner, Darrick J. Wong, David Chinner
  Cc: linux-xfs, Chandan Babu R, Dave Chinner,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2147 bytes --]

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);
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-27  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-22 23:38 linux-next: manual merge of the vfs-brauner tree with the xfs tree Stephen Rothwell
2023-08-23  4:44 ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2024-02-26 23:28 Stephen Rothwell
2024-02-27  8:44 ` Chandan Babu R

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox