diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-11 12:15:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-11 12:15:30 -0500 |
commit | ef5beed9985093da1ac74210abae5cad11530543 (patch) | |
tree | e90ad633376bcfa0686272766c5baa2370b10b10 /fs | |
parent | a4fac3b5d18204b64ea7adf383c4e166358c0a79 (diff) | |
parent | 62bdf94a2049822ef8c6d4b0e83cd9c3a1663ab4 (diff) |
Merge tag 'nfs-for-4.9-3' of git://git.linux-nfs.org/projects/anna/linux-nfs
Pull NFS client bugfixes from Anna Schumaker:
"Most of these fix regressions in 4.9, and none are going to stable
this time around.
Bugfixes:
- Trim extra slashes in v4 nfs_paths to fix tools that use this
- Fix a -Wmaybe-uninitialized warnings
- Fix suspicious RCU usages
- Fix Oops when mounting multiple servers at once
- Suppress a false-positive pNFS error
- Fix a DMAR failure in NFS over RDMA"
* tag 'nfs-for-4.9-3' of git://git.linux-nfs.org/projects/anna/linux-nfs:
xprtrdma: Fix DMAR failure in frwr_op_map() after reconnect
fs/nfs: Fix used uninitialized warn in nfs4_slot_seqid_in_use()
NFS: Don't print a pNFS error if we aren't using pNFS
NFS: Ignore connections that have cl_rpcclient uninitialized
SUNRPC: Fix suspicious RCU usage
NFSv4.1: work around -Wmaybe-uninitialized warning
NFS: Trim extra slash in v4 nfs_path
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/client.c | 3 | ||||
-rw-r--r-- | fs/nfs/namespace.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4session.c | 12 | ||||
-rw-r--r-- | fs/nfs/pnfs.c | 2 |
4 files changed, 12 insertions, 7 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 7555ba889d1f..ebecfb8fba06 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -314,7 +314,8 @@ static struct nfs_client *nfs_match_client(const struct nfs_client_initdata *dat | |||
314 | /* Match the full socket address */ | 314 | /* Match the full socket address */ |
315 | if (!rpc_cmp_addr_port(sap, clap)) | 315 | if (!rpc_cmp_addr_port(sap, clap)) |
316 | /* Match all xprt_switch full socket addresses */ | 316 | /* Match all xprt_switch full socket addresses */ |
317 | if (!rpc_clnt_xprt_switch_has_addr(clp->cl_rpcclient, | 317 | if (IS_ERR(clp->cl_rpcclient) || |
318 | !rpc_clnt_xprt_switch_has_addr(clp->cl_rpcclient, | ||
318 | sap)) | 319 | sap)) |
319 | continue; | 320 | continue; |
320 | 321 | ||
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index c8162c660c44..5551e8ef67fd 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c | |||
@@ -98,7 +98,7 @@ rename_retry: | |||
98 | return end; | 98 | return end; |
99 | } | 99 | } |
100 | namelen = strlen(base); | 100 | namelen = strlen(base); |
101 | if (flags & NFS_PATH_CANONICAL) { | 101 | if (*end == '/') { |
102 | /* Strip off excess slashes in base string */ | 102 | /* Strip off excess slashes in base string */ |
103 | while (namelen > 0 && base[namelen - 1] == '/') | 103 | while (namelen > 0 && base[namelen - 1] == '/') |
104 | namelen--; | 104 | namelen--; |
diff --git a/fs/nfs/nfs4session.c b/fs/nfs/nfs4session.c index b62973045a3e..a61350f75c74 100644 --- a/fs/nfs/nfs4session.c +++ b/fs/nfs/nfs4session.c | |||
@@ -178,12 +178,14 @@ static int nfs4_slot_get_seqid(struct nfs4_slot_table *tbl, u32 slotid, | |||
178 | __must_hold(&tbl->slot_tbl_lock) | 178 | __must_hold(&tbl->slot_tbl_lock) |
179 | { | 179 | { |
180 | struct nfs4_slot *slot; | 180 | struct nfs4_slot *slot; |
181 | int ret; | ||
181 | 182 | ||
182 | slot = nfs4_lookup_slot(tbl, slotid); | 183 | slot = nfs4_lookup_slot(tbl, slotid); |
183 | if (IS_ERR(slot)) | 184 | ret = PTR_ERR_OR_ZERO(slot); |
184 | return PTR_ERR(slot); | 185 | if (!ret) |
185 | *seq_nr = slot->seq_nr; | 186 | *seq_nr = slot->seq_nr; |
186 | return 0; | 187 | |
188 | return ret; | ||
187 | } | 189 | } |
188 | 190 | ||
189 | /* | 191 | /* |
@@ -196,7 +198,7 @@ static int nfs4_slot_get_seqid(struct nfs4_slot_table *tbl, u32 slotid, | |||
196 | static bool nfs4_slot_seqid_in_use(struct nfs4_slot_table *tbl, | 198 | static bool nfs4_slot_seqid_in_use(struct nfs4_slot_table *tbl, |
197 | u32 slotid, u32 seq_nr) | 199 | u32 slotid, u32 seq_nr) |
198 | { | 200 | { |
199 | u32 cur_seq; | 201 | u32 cur_seq = 0; |
200 | bool ret = false; | 202 | bool ret = false; |
201 | 203 | ||
202 | spin_lock(&tbl->slot_tbl_lock); | 204 | spin_lock(&tbl->slot_tbl_lock); |
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 56b2d96f9103..259ef85f435a 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -146,6 +146,8 @@ set_pnfs_layoutdriver(struct nfs_server *server, const struct nfs_fh *mntfh, | |||
146 | u32 id; | 146 | u32 id; |
147 | int i; | 147 | int i; |
148 | 148 | ||
149 | if (fsinfo->nlayouttypes == 0) | ||
150 | goto out_no_driver; | ||
149 | if (!(server->nfs_client->cl_exchange_flags & | 151 | if (!(server->nfs_client->cl_exchange_flags & |
150 | (EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS))) { | 152 | (EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS))) { |
151 | printk(KERN_ERR "NFS: %s: cl_exchange_flags 0x%x\n", | 153 | printk(KERN_ERR "NFS: %s: cl_exchange_flags 0x%x\n", |