Subject: linux-next: manual merge of the nfsd tree with the nfs-anna tree

From: Mark Brown <[email-masked]>
Date: Thu, 2 Oct 2025 12:08:33 +0100

Hi all,

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

  fs/nfsd/vfs.h

between commit:

  d11f6cd1bb4a4 ("NFSD: filecache: add STATX_DIOALIGN and STATX_DIO_READ_ALIGN support")

from the nfs-anna tree and commits:

  c926f0298d3cd ("NFSD: Relocate the fh_want_write() and fh_drop_write() helpers")
  c1f203e46c55a ("NFSD: Move the fh_getattr() helper")

from the nfsd 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.

diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index 3edccc38db42e..e70bc699e9a51 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -697,6 +697,10 @@ __be32 fh_getattr(const struct svc_fh *fhp, struct kstat *stat)
 		.dentry		= fhp->fh_dentry,
 	};
 	u32 request_mask = STATX_BASIC_STATS;
+	struct inode *inode = d_inode(p.dentry);
+
+	if (S_ISREG(inode->i_mode))
+		request_mask |= (STATX_DIOALIGN | STATX_DIO_READ_ALIGN);
 
 	if (fhp->fh_maxsize == NFS4_FHSIZE)
 		request_mask |= (STATX_BTIME | STATX_CHANGE_COOKIE);