Re: linux-next: manual merge of the vfs-brauner tree with the ext4 tree

From: Jan Kara

Date: Mon Mar 30 2026 - 04:54:53 EST


On Fri 27-03-26 17:38:30, Mark Brown wrote:
> Hi all,
>
> Today's linux-next merge of the vfs-brauner tree got a conflict in:
>
> fs/ext4/fsync.c
>
> between commit:
>
> 3a0fb9e5017077 ("ext4: fix fsync(2) for nojournal mode")
>
> from the ext4 tree and commit:
>
> 41189b49bcf1c2 ("ext4: Track metadata bhs in fs-private inode part")
>
> 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. Thanks!

Honza

>
> diff --cc fs/ext4/fsync.c
> index bd8f230fa507e7,aa80af2b4eea28..00000000000000
> --- a/fs/ext4/fsync.c
> +++ b/fs/ext4/fsync.c
> @@@ -83,23 -83,12 +83,24 @@@ static int ext4_fsync_nojournal(struct
> int datasync, bool *needs_barrier)
> {
> struct inode *inode = file->f_inode;
> + struct writeback_control wbc = {
> + .sync_mode = WB_SYNC_ALL,
> + .nr_to_write = 0,
> + };
> int ret;
>
> - ret = generic_buffers_fsync_noflush(file, start, end, datasync);
> + ret = mmb_fsync_noflush(file, &EXT4_I(inode)->i_metadata_bhs,
> + start, end, datasync);
> - if (!ret)
> - ret = ext4_sync_parent(inode);
> + if (ret)
> + return ret;
> +
> + /* Force writeout of inode table buffer to disk */
> + ret = ext4_write_inode(inode, &wbc);
> + if (ret)
> + return ret;
> +
> + ret = ext4_sync_parent(inode);
> +
> if (test_opt(inode->i_sb, BARRIER))
> *needs_barrier = true;
>


--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR