* [PATCH] NFSv4: add declaration of current_stateid
@ 2019-10-15 12:19 Ben Dooks
2019-10-15 16:31 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Ben Dooks @ 2019-10-15 12:19 UTC (permalink / raw)
To: linux-kernel
Cc: Ben Dooks, Trond Myklebust, Anna Schumaker, linux-nfs, linux-kernel
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?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Cc: linux-nfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
fs/nfs/nfs4_fs.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 16b2e5cc3e94..330f45268060 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -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);
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] NFSv4: add declaration of current_stateid
2019-10-15 12:19 [PATCH] NFSv4: add declaration of current_stateid Ben Dooks
@ 2019-10-15 16:31 ` Christoph Hellwig
2019-10-16 16:27 ` Ben Dooks
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2019-10-15 16:31 UTC (permalink / raw)
To: Ben Dooks
Cc: linux-kernel, Trond Myklebust, Anna Schumaker, linux-nfs, linux-kernel
On Tue, Oct 15, 2019 at 01:19:53PM +0100, Ben Dooks wrote:
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] NFSv4: add declaration of current_stateid
2019-10-15 16:31 ` Christoph Hellwig
@ 2019-10-16 16:27 ` Ben Dooks
0 siblings, 0 replies; 3+ messages in thread
From: Ben Dooks @ 2019-10-16 16:27 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-kernel, Trond Myklebust, Anna Schumaker, linux-nfs, linux-kernel
On 15/10/2019 17:31, Christoph Hellwig wrote:
> On Tue, Oct 15, 2019 at 01:19:53PM +0100, Ben Dooks wrote:
>> 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.
> 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.
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
https://www.codethink.co.uk/privacy.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-16 16:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 12:19 [PATCH] NFSv4: add declaration of current_stateid Ben Dooks
2019-10-15 16:31 ` Christoph Hellwig
2019-10-16 16:27 ` Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).