Subject: Re: linux-next: manual merge of the vfs tree with the fuse tree

From: Stephen Rothwell <[email-masked]>
Date: Wed, 8 May 2019 11:01:37 +1000

Hi all,

On Tue, 7 May 2019 09:53:23 +1000 Stephen Rothwell <[email-masked]> wrote:
>
> Hi all,
> 
> Today's linux-next merge of the vfs tree got a conflict in:
> 
>   fs/fuse/inode.c
> 
> between commit:
> 
>   829f949b6e06 ("fuse: clean up fuse_alloc_inode")
> 
> from the fuse tree and commit:
> 
>   9baf28bbfea1 ("fuse: switch to ->free_inode()")
> 
> from the vfs 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/fuse/inode.c
> index bc02bad1be7c,f485d09d14df..000000000000
> --- a/fs/fuse/inode.c
> +++ b/fs/fuse/inode.c
> @@@ -102,25 -104,16 +102,16 @@@ static struct inode *fuse_alloc_inode(s
>   		return NULL;
>   	}
>   
>  -	return inode;
>  +	return &fi->inode;
>   }
>   
> - static void fuse_i_callback(struct rcu_head *head)
> - {
> - 	struct inode *inode = container_of(head, struct inode, i_rcu);
> - 	kmem_cache_free(fuse_inode_cachep, get_fuse_inode(inode));
> - }
> - 
> - static void fuse_destroy_inode(struct inode *inode)
> + static void fuse_free_inode(struct inode *inode)
>   {
>   	struct fuse_inode *fi = get_fuse_inode(inode);
> - 	if (S_ISREG(inode->i_mode) && !is_bad_inode(inode)) {
> - 		WARN_ON(!list_empty(&fi->write_files));
> - 		WARN_ON(!list_empty(&fi->queued_writes));
> - 	}
> + 
>   	mutex_destroy(&fi->mutex);
>   	kfree(fi->forget);
> - 	call_rcu(&inode->i_rcu, fuse_i_callback);
> + 	kmem_cache_free(fuse_inode_cachep, fi);
>   }
>   
>   static void fuse_evict_inode(struct inode *inode)

This is now a conflict between the fuse tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell