Skip to contentSkip to conversation

NFSv4: add declaration of current_stateid

PATCH Superseded Ben Dooks 2 participants 3 messages Oct 15, 2019 – Oct 16, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 NFSv4: add declaration of current_stateid

The current_stateid is exported from nfs4state.c but not declared in any of the headers. Add to nfs4_fs.h to remove the following warning:

fs/nfs/nfs4state.c:80:20: warning: symbol 'current_stateid' was not declared. Should it be static?

---
Cc: Trond Myklebust <[email protected]>
Cc: Anna Schumaker <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 fs/nfs/nfs4_fs.h | 2 ++
 1 file changed, 2 insertions(+)
fs/nfs/nfs4_fs.h +2 -0
index 16b2e5cc3e94..330f45268060 100644
@@ -445,6 +445,8 @@ extern void nfs4_set_lease_period(struct nfs_client *clp,
 
 
 /* nfs4state.c */
+extern const nfs4_stateid current_stateid;
+
 const struct cred *nfs4_get_clid_cred(struct nfs_client *clp);
 const struct cred *nfs4_get_machine_cred(struct nfs_client *clp);
 const struct cred *nfs4_get_renew_cred(struct nfs_client *clp);
Signature · 1 line
2.23.0
#1 lore raw
Quoted 3 lines · Ben Dooks

The current_stateid is exported from nfs4state.c but not declared in any of the headers. Add to nfs4_fs.h to remove the following warning:

I think you also need to remove the extern in pnfs.c as well.

Also nfs4_stateid_is_current has a local variable with the same name, so you might want to rename that so that we don't get symbol shadowing warnings.

author
#2 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Ben Dooks

The current_stateid is exported from nfs4state.c but not declared in any of the headers. Add to nfs4_fs.h to remove the following warning:

I think you also need to remove the extern in pnfs.c as well.

ok, thanks, will sort.

Quoted 4 lines

Also nfs4_stateid_is_current has a local variable with the same name, so you might want to rename that so that we don't get symbol shadowing warnings.

ok, will do.

Signature · 4 lines
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html