Skip to content

Commit 8004279

Browse files
committed
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
2 parents e0b38d2 + 4529e00 commit 8004279

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

fs/nfs/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ config NFS_V4
8787
space programs which can be found in the Linux nfs-utils package,
8888
available from http://linux-nfs.org/.
8989

90-
If unsure, say Y.
90+
If unsure, say N.
9191

9292
config NFS_SWAP
9393
bool "Provide swap over NFS support"
@@ -100,6 +100,7 @@ config NFS_SWAP
100100
config NFS_V4_0
101101
bool "NFS client support for NFSv4.0"
102102
depends on NFS_V4
103+
default y
103104
help
104105
This option enables support for minor version 0 of the NFSv4 protocol
105106
(RFC 3530) in the kernel's NFS client.

fs/nfs/nfs3proc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,13 @@ nfs3_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
392392
if (status != 0)
393393
goto out_release_acls;
394394

395-
if (d_alias)
395+
if (d_alias) {
396+
if (d_is_dir(d_alias)) {
397+
status = -EISDIR;
398+
goto out_dput;
399+
}
396400
dentry = d_alias;
401+
}
397402

398403
/* When we created the file with exclusive semantics, make
399404
* sure we set the attributes afterwards. */

net/sunrpc/xprtrdma/verbs.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ void rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, int needed)
13621362
needed += RPCRDMA_MAX_RECV_BATCH;
13631363

13641364
if (atomic_inc_return(&ep->re_receiving) > 1)
1365-
goto out;
1365+
goto out_dec;
13661366

13671367
/* fast path: all needed reps can be found on the free list */
13681368
wr = NULL;
@@ -1385,7 +1385,7 @@ void rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, int needed)
13851385
++count;
13861386
}
13871387
if (!wr)
1388-
goto out;
1388+
goto out_dec;
13891389

13901390
rc = ib_post_recv(ep->re_id->qp, wr,
13911391
(const struct ib_recv_wr **)&bad_wr);
@@ -1400,9 +1400,10 @@ void rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, int needed)
14001400
--count;
14011401
}
14021402
}
1403+
1404+
out_dec:
14031405
if (atomic_dec_return(&ep->re_receiving) > 0)
14041406
complete(&ep->re_done);
1405-
14061407
out:
14071408
trace_xprtrdma_post_recvs(r_xprt, count);
14081409
ep->re_receive_count += count;

0 commit comments

Comments
 (0)