Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260876
b: refs/heads/master
c: ed1e621
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jul 25, 2011
1 parent 6744673 commit 27820f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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: 73ca1001ed6881b476e8252adcd0eede1ea368ea
refs/heads/master: ed1e6211a0a134ff23592c6f057af982ad5dab52
16 changes: 8 additions & 8 deletions trunk/fs/nfs/delegation.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,11 @@ int nfs_inode_return_delegation(struct inode *inode)
return err;
}

static void nfs_mark_return_delegation(struct nfs_delegation *delegation)
static void nfs_mark_return_delegation(struct nfs_server *server,
struct nfs_delegation *delegation)
{
struct nfs_client *clp = NFS_SERVER(delegation->inode)->nfs_client;

set_bit(NFS_DELEGATION_RETURN, &delegation->flags);
set_bit(NFS4CLNT_DELEGRETURN, &clp->cl_state);
set_bit(NFS4CLNT_DELEGRETURN, &server->nfs_client->cl_state);
}

/**
Expand Down Expand Up @@ -441,7 +440,7 @@ static void nfs_mark_return_all_delegation_types(struct nfs_server *server,
if ((delegation->type == (FMODE_READ|FMODE_WRITE)) && !(flags & FMODE_WRITE))
continue;
if (delegation->type & flags)
nfs_mark_return_delegation(delegation);
nfs_mark_return_delegation(server, delegation);
}
}

Expand Down Expand Up @@ -508,7 +507,7 @@ static void nfs_mark_return_unreferenced_delegations(struct nfs_server *server)
list_for_each_entry_rcu(delegation, &server->delegations, super_list) {
if (test_and_clear_bit(NFS_DELEGATION_REFERENCED, &delegation->flags))
continue;
nfs_mark_return_delegation(delegation);
nfs_mark_return_delegation(server, delegation);
}
}

Expand Down Expand Up @@ -539,7 +538,8 @@ void nfs_expire_unreferenced_delegations(struct nfs_client *clp)
int nfs_async_inode_return_delegation(struct inode *inode,
const nfs4_stateid *stateid)
{
struct nfs_client *clp = NFS_SERVER(inode)->nfs_client;
struct nfs_server *server = NFS_SERVER(inode);
struct nfs_client *clp = server->nfs_client;
struct nfs_delegation *delegation;

rcu_read_lock();
Expand All @@ -549,7 +549,7 @@ int nfs_async_inode_return_delegation(struct inode *inode,
rcu_read_unlock();
return -ENOENT;
}
nfs_mark_return_delegation(delegation);
nfs_mark_return_delegation(server, delegation);
rcu_read_unlock();

nfs_delegation_run_state_manager(clp);
Expand Down

0 comments on commit 27820f8

Please sign in to comment.