Skip to content

Commit d49dd11

Browse files
bjdooks-ctTrond Myklebust
authored andcommitted
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? Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 5326de9 commit d49dd11

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

fs/nfs/nfs4_fs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,8 @@ extern void nfs4_set_lease_period(struct nfs_client *clp,
454454

455455

456456
/* nfs4state.c */
457+
extern const nfs4_stateid current_stateid;
458+
457459
const struct cred *nfs4_get_clid_cred(struct nfs_client *clp);
458460
const struct cred *nfs4_get_machine_cred(struct nfs_client *clp);
459461
const struct cred *nfs4_get_renew_cred(struct nfs_client *clp);

fs/nfs/nfs4proc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5107,12 +5107,12 @@ static bool nfs4_stateid_is_current(nfs4_stateid *stateid,
51075107
const struct nfs_lock_context *l_ctx,
51085108
fmode_t fmode)
51095109
{
5110-
nfs4_stateid current_stateid;
5110+
nfs4_stateid _current_stateid;
51115111

51125112
/* If the current stateid represents a lost lock, then exit */
5113-
if (nfs4_set_rw_stateid(&current_stateid, ctx, l_ctx, fmode) == -EIO)
5113+
if (nfs4_set_rw_stateid(&_current_stateid, ctx, l_ctx, fmode) == -EIO)
51145114
return true;
5115-
return nfs4_stateid_match(stateid, &current_stateid);
5115+
return nfs4_stateid_match(stateid, &_current_stateid);
51165116
}
51175117

51185118
static bool nfs4_error_stateid_expired(int err)

fs/nfs/pnfs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,8 +2160,6 @@ _pnfs_grab_empty_layout(struct inode *ino, struct nfs_open_context *ctx)
21602160
return NULL;
21612161
}
21622162

2163-
extern const nfs4_stateid current_stateid;
2164-
21652163
static void _lgopen_prepare_attached(struct nfs4_opendata *data,
21662164
struct nfs_open_context *ctx)
21672165
{

0 commit comments

Comments
 (0)