Subject: linux-next: manual merge of the vfs-brauner tree with the nfsd tree

From: Stephen Rothwell <[email-masked]>
Date: Mon, 17 Nov 2025 07:34:52 +1100

Hi all,

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

  fs/nfsd/nfs4recover.c

between commit:

  8a25e05a98ab ("nfsd: move name lookup out of nfsd4_list_rec_dir()")

from the nfsd tree and commit:

  4fa76319cd0c ("vfs: allow rmdir to wait for delegation break on parent")

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/nfsd/nfs4recover.c
index b1005abcb903,1f031e5af5b2..000000000000
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@@ -201,18 -210,17 +199,16 @@@ nfsd4_create_clid_dir(struct nfs4_clien
  		 * In the 4.0 case, we should never get here; but we may
  		 * as well be forgiving and just succeed silently.
  		 */
- 		goto out_put;
- 	dentry = vfs_mkdir(&nop_mnt_idmap, d_inode(dir), dentry, S_IRWXU);
+ 		goto out_end;
+ 	dentry = vfs_mkdir(&nop_mnt_idmap, d_inode(dir), dentry, S_IRWXU, NULL);
  	if (IS_ERR(dentry))
  		status = PTR_ERR(dentry);
- out_put:
- 	if (!status)
- 		dput(dentry);
- out_unlock:
- 	inode_unlock(d_inode(dir));
+ out_end:
+ 	end_creating(dentry);
+ out:
  	if (status == 0) {
  		if (nn->in_grace)
 -			__nfsd4_create_reclaim_record_grace(clp, dname,
 -					HEXDIR_LEN, nn);
 +			__nfsd4_create_reclaim_record_grace(clp, dname, nn);
  		vfs_fsync(nn->rec_file, 0);
  	} else {
  		printk(KERN_ERR "NFSD: failed to write recovery record"
@@@ -406,17 -415,10 +394,17 @@@ purge_old(struct dentry *parent, char *
  	if (nfs4_has_reclaimed_state(name, nn))
  		goto out_free;
  
 -	status = vfs_rmdir(&nop_mnt_idmap, d_inode(parent), child, NULL);
 -	if (status)
 -		printk("failed to remove client recovery directory %pd\n",
 -				child);
 +	inode_lock_nested(d_inode(parent), I_MUTEX_PARENT);
 +	child = lookup_one(&nop_mnt_idmap, &QSTR(cname), parent);
 +	if (!IS_ERR(child)) {
- 		status = vfs_rmdir(&nop_mnt_idmap, d_inode(parent), child);
++		status = vfs_rmdir(&nop_mnt_idmap, d_inode(parent), child, NULL);
 +		if (status)
 +			printk("failed to remove client recovery directory %pd\n",
 +			       child);
 +		dput(child);
 +	}
 +	inode_unlock(d_inode(parent));
 +
  out_free:
  	kfree(name.data);
  out: