Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294543
b: refs/heads/master
c: 3114ea7
h: refs/heads/master
i:
  294541: b0dd72a
  294539: de1b556
  294535: b25aa27
  294527: b468bf9
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 7, 2012
1 parent 93dd540 commit e9aabb5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 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: cf470c3e004efe16d73dc8ba9b29bdc9a5327cda
refs/heads/master: 3114ea7a24d3264c090556a2444fc6d2c06176d4
1 change: 1 addition & 0 deletions trunk/fs/nfs/nfs4_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ struct nfs4_exception {
long timeout;
int retry;
struct nfs4_state *state;
struct inode *inode;
};

struct nfs4_state_recovery_ops {
Expand Down
13 changes: 12 additions & 1 deletion trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,28 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc
{
struct nfs_client *clp = server->nfs_client;
struct nfs4_state *state = exception->state;
struct inode *inode = exception->inode;
int ret = errorcode;

exception->retry = 0;
switch(errorcode) {
case 0:
return 0;
case -NFS4ERR_OPENMODE:
if (nfs_have_delegation(inode, FMODE_READ)) {
nfs_inode_return_delegation(inode);
exception->retry = 1;
return 0;
}
if (state == NULL)
break;
nfs4_schedule_stateid_recovery(server, state);
goto wait_on_recovery;
case -NFS4ERR_DELEG_REVOKED:
case -NFS4ERR_ADMIN_REVOKED:
case -NFS4ERR_BAD_STATEID:
if (state != NULL)
nfs_remove_bad_delegation(state->inode);
case -NFS4ERR_OPENMODE:
if (state == NULL)
break;
nfs4_schedule_stateid_recovery(server, state);
Expand Down Expand Up @@ -1939,6 +1949,7 @@ static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
struct nfs_server *server = NFS_SERVER(inode);
struct nfs4_exception exception = {
.state = state,
.inode = inode,
};
int err;
do {
Expand Down

0 comments on commit e9aabb5

Please sign in to comment.