NFSv4: add declaration of current_stateid
authorBen Dooks <ben.dooks@codethink.co.uk>
Wed, 16 Oct 2019 16:28:21 +0000 (17:28 +0100)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 18 Nov 2019 09:36:45 +0000 (10:36 +0100)
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>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/pnfs.c

index 3264636..a452011 100644 (file)
@@ -454,6 +454,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);
index 2d3c12f..76d3716 100644 (file)
@@ -5107,12 +5107,12 @@ static bool nfs4_stateid_is_current(nfs4_stateid *stateid,
                const struct nfs_lock_context *l_ctx,
                fmode_t fmode)
 {
-       nfs4_stateid current_stateid;
+       nfs4_stateid _current_stateid;
 
        /* If the current stateid represents a lost lock, then exit */
-       if (nfs4_set_rw_stateid(&current_stateid, ctx, l_ctx, fmode) == -EIO)
+       if (nfs4_set_rw_stateid(&_current_stateid, ctx, l_ctx, fmode) == -EIO)
                return true;
-       return nfs4_stateid_match(stateid, &current_stateid);
+       return nfs4_stateid_match(stateid, &_current_stateid);
 }
 
 static bool nfs4_error_stateid_expired(int err)
index bb80034..cec3070 100644 (file)
@@ -2160,8 +2160,6 @@ out_unlock:
        return NULL;
 }
 
-extern const nfs4_stateid current_stateid;
-
 static void _lgopen_prepare_attached(struct nfs4_opendata *data,
                                     struct nfs_open_context *ctx)
 {