NFS CLient Bugfixes for Linux 7.0-rc

Bugfixes:
  * Fix NFS KConfig typos
  * Decrement re_receiving on the early exit paths
  * return EISDIR on nfs3_proc_create if d_alias is a dir
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEnZ5MQTpR7cLU7KEp18tUv7ClQOsFAmmy+V4ACgkQ18tUv7Cl
 QOs3zRAAwRBqp+TP0sFuqqHnn9H4KQBusOT7h+D7un+ux+iVxjJeesyQIPRSrrtU
 sIKO27MkGuncevnaYtzvdMtshMafxXZszNkk/m4VOsTM/Z74ndUjZXvEipWmxDn4
 20LCOY6x25hRaRJKy7RZtI4a38mzyY2pNS2iLMdy/d9wUItgJetDtZ6VSdwnXHNM
 WkkvkowoTLEHgnll517OYKhXZj3VdJxSL3dx/TUka45xefR92qff8Ii9O7dOE992
 yMVeFPYodHDnm0/GRMqBvSorrmexCgTX2CtM8u5dTEJCIyhmTI9fvFalxlFZchVT
 1og10Uiks8v8SxFU1KqZ3/qRnVIPe4yk/sxSQ+auVw/9Ucvjx3x45EcSijLBBpMJ
 Vh8d8pYtKG3Adj4MV+0hl8Y+XrOjswN6f05I177i2wNFTV5R5k2iBKkHKlxzdrnz
 N/RlRLkGl0nKYwccsRn/g39YPi4a4fv3VtXCQtMQKRJ4Q5B2/V7gafM971EPqMsi
 J16KjZ/WFiYOP2Y8dpnMT6haXTtGrQPP+Z+kSBFuCjZefjDubU3W9LyQflvwNLA+
 jff8YBRwyWKy0h/r6IlBgWz++a7zIEO3W8yrHeZ5KLmNyCTwJBnNXjLmpuzePPCj
 DKVAIxIIi3Ey06LmR2OPT0NDQ/RYvL2hBfkEP1KOl7/82I44zxU=
 =Bv1D
 -----END PGP SIGNATURE-----

Merge tag 'nfs-for-7.0-2' of git://git.linux-nfs.org/projects/anna/linux-nfs

Pull NFS client fixes from Anna Schumaker:

 - Fix NFS KConfig typos

 - Decrement re_receiving on the early exit paths

 - return EISDIR on nfs3_proc_create if d_alias is a dir

* tag 'nfs-for-7.0-2' of git://git.linux-nfs.org/projects/anna/linux-nfs:
  NFS: Fix NFS KConfig typos
  xprtrdma: Decrement re_receiving on the early exit paths
  nfs: return EISDIR on nfs3_proc_create if d_alias is a dir
This commit is contained in:
Linus Torvalds 2026-03-12 12:38:17 -07:00
commit 8004279c41
3 changed files with 12 additions and 5 deletions

View File

@ -87,7 +87,7 @@ config NFS_V4
space programs which can be found in the Linux nfs-utils package,
available from http://linux-nfs.org/.
If unsure, say Y.
If unsure, say N.
config NFS_SWAP
bool "Provide swap over NFS support"
@ -100,6 +100,7 @@ config NFS_SWAP
config NFS_V4_0
bool "NFS client support for NFSv4.0"
depends on NFS_V4
default y
help
This option enables support for minor version 0 of the NFSv4 protocol
(RFC 3530) in the kernel's NFS client.

View File

@ -392,8 +392,13 @@ nfs3_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
if (status != 0)
goto out_release_acls;
if (d_alias)
if (d_alias) {
if (d_is_dir(d_alias)) {
status = -EISDIR;
goto out_dput;
}
dentry = d_alias;
}
/* When we created the file with exclusive semantics, make
* sure we set the attributes afterwards. */

View File

@ -1362,7 +1362,7 @@ void rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, int needed)
needed += RPCRDMA_MAX_RECV_BATCH;
if (atomic_inc_return(&ep->re_receiving) > 1)
goto out;
goto out_dec;
/* fast path: all needed reps can be found on the free list */
wr = NULL;
@ -1385,7 +1385,7 @@ void rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, int needed)
++count;
}
if (!wr)
goto out;
goto out_dec;
rc = ib_post_recv(ep->re_id->qp, wr,
(const struct ib_recv_wr **)&bad_wr);
@ -1400,9 +1400,10 @@ void rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, int needed)
--count;
}
}
out_dec:
if (atomic_dec_return(&ep->re_receiving) > 0)
complete(&ep->re_done);
out:
trace_xprtrdma_post_recvs(r_xprt, count);
ep->re_receive_count += count;