Skip to contentSkip to conversation

linux-next: build failure after merge of the nfsd tree

PATCH In review Stephen Rothwell 3 participants 4 messages Jul 20, 2015 – Jul 21, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi,

After merging the nfsd tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

fs/nfsd/nfs4state.c: In function 'client_has_state':
fs/nfsd/nfs4state.c:2249:22: error: 'struct nfs4_client' has no member named 'cl_lo_states'
|| !list_empty(&clp->cl_lo_states)

                      ^

fs/nfsd/nfs4state.c:2252:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

Caused by commit

395b297af7bf ("nfsd: Add layouts checking in client_has_state()")

cl_lo_states is only defined when CONFIG_NFSD_PNFS is set.

I have used the nsfd tree from next-20150720 for today.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#1 lore raw

PATCH v3 1/1 nfsd: Add layouts checking in client_has_state()

Layout is a state resource, nfsd should check it too.

v2, drop unneeded updating in nfsd4_renew()
v3, fix compile error without CONFIG_NFSD_PNFS

---
 fs/nfsd/nfs4state.c | 3 +++
 1 file changed, 3 insertions(+)
fs/nfsd/nfs4state.c +3 -0
index 61dfb33..94a2980 100644
@@ -2241,6 +2241,9 @@ static bool client_has_state(struct nfs4_client *clp)
 	 * Also note we should probably be using this in 4.0 case too.
 	 */
 	return !list_empty(&clp->cl_openowners)
+#ifdef CONFIG_NFSD_PNFS
+		|| !list_empty(&clp->cl_lo_states)
+#endif
 		|| !list_empty(&clp->cl_delegations)
 		|| !list_empty(&clp->cl_sessions);
 }
Signature · 1 line
2.4.3
#2 lore raw

Re: [PATCH v3] nfsd: Add layouts checking in client_has_state()

Quoted 4 lines · Kinglong Mee

Layout is a state resource, nfsd should check it too.

v2, drop unneeded updating in nfsd4_renew()
v3, fix compile error without CONFIG_NFSD_PNFS

Got it, thanks.--b.

Quoted 22 lines
---
 fs/nfsd/nfs4state.c | 3 +++
 1 file changed, 3 insertions(+)
fs/nfsd/nfs4state.c +3 -0
index 61dfb33..94a2980 100644
@@ -2241,6 +2241,9 @@ static bool client_has_state(struct nfs4_client *clp)
 	 * Also note we should probably be using this in 4.0 case too.
 	 */
 	return !list_empty(&clp->cl_openowners)
+#ifdef CONFIG_NFSD_PNFS
+		|| !list_empty(&clp->cl_lo_states)
+#endif
 		|| !list_empty(&clp->cl_delegations)
 		|| !list_empty(&clp->cl_sessions);
 }
Signature · 1 line
2.4.3
#3 lore raw
In reply to Stephen Rothwell

Sorry for my fault.
Please drop the old version and use the new version 3.

thanks,
Kinglong Mee

Quoted 21 lines · Stephen Rothwell

Hi,

After merging the nfsd tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

fs/nfsd/nfs4state.c: In function 'client_has_state':
fs/nfsd/nfs4state.c:2249:22: error: 'struct nfs4_client' has no member named 'cl_lo_states'
|| !list_empty(&clp->cl_lo_states)

                      ^

fs/nfsd/nfs4state.c:2252:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

Caused by commit

395b297af7bf ("nfsd: Add layouts checking in client_has_state()")

cl_lo_states is only defined when CONFIG_NFSD_PNFS is set.

I have used the nsfd tree from next-20150720 for today.