Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320219
b: refs/heads/master
c: eb64cf9
h: refs/heads/master
i:
  320217: 64719cb
  320215: d4b624c
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jul 16, 2012
1 parent 1231d93 commit 661a0b7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 89af2739589365bf0dd2023c6a076b22ccd530f9
refs/heads/master: eb64cf964d453f8b559a8c0c2625952dbbcb5838
23 changes: 12 additions & 11 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1758,8 +1758,8 @@ static int nfs4_open_expired(struct nfs4_state_owner *sp, struct nfs4_state *sta
#if defined(CONFIG_NFS_V4_1)
static int nfs41_check_expired_stateid(struct nfs4_state *state, nfs4_stateid *stateid, unsigned int flags)
{
int status = NFS_OK;
struct nfs_server *server = NFS_SERVER(state->inode);
int status = -NFS4ERR_BAD_STATEID;

if (state->flags & flags) {
status = nfs41_test_stateid(server, stateid);
Expand All @@ -1774,16 +1774,17 @@ static int nfs41_check_expired_stateid(struct nfs4_state *state, nfs4_stateid *s

static int nfs41_open_expired(struct nfs4_state_owner *sp, struct nfs4_state *state)
{
int deleg_status, open_status;
int deleg_flags = 1 << NFS_DELEGATED_STATE;
int open_flags = (1 << NFS_O_RDONLY_STATE) | (1 << NFS_O_WRONLY_STATE) | (1 << NFS_O_RDWR_STATE);
int status;

deleg_status = nfs41_check_expired_stateid(state, &state->stateid, deleg_flags);
open_status = nfs41_check_expired_stateid(state, &state->open_stateid, open_flags);
nfs41_check_expired_stateid(state, &state->stateid, deleg_flags);
status = nfs41_check_expired_stateid(state, &state->open_stateid,
open_flags);

if ((deleg_status == NFS_OK) && (open_status == NFS_OK))
return NFS_OK;
return nfs4_open_expired(sp, state);
if (status != NFS_OK)
status = nfs4_open_expired(sp, state);
return status;
}
#endif

Expand Down Expand Up @@ -4690,7 +4691,7 @@ static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request
#if defined(CONFIG_NFS_V4_1)
static int nfs41_check_expired_locks(struct nfs4_state *state)
{
int status, ret = NFS_OK;
int status, ret = -NFS4ERR_BAD_STATEID;
struct nfs4_lock_state *lsp;
struct nfs_server *server = NFS_SERVER(state->inode);

Expand All @@ -4716,9 +4717,9 @@ static int nfs41_lock_expired(struct nfs4_state *state, struct file_lock *reques

if (test_bit(LK_STATE_IN_USE, &state->flags))
status = nfs41_check_expired_locks(state);
if (status == NFS_OK)
return status;
return nfs4_lock_expired(state, request);
if (status != NFS_OK)
status = nfs4_lock_expired(state, request);
return status;
}
#endif

Expand Down

0 comments on commit 661a0b7

Please sign in to comment.