|
@@ -1307,15 +1307,13 @@ static struct nfs4_state *nfs4_try_open_cached(struct nfs4_opendata *opendata)
|
|
int ret = -EAGAIN;
|
|
int ret = -EAGAIN;
|
|
|
|
|
|
for (;;) {
|
|
for (;;) {
|
|
|
|
+ spin_lock(&state->owner->so_lock);
|
|
if (can_open_cached(state, fmode, open_mode)) {
|
|
if (can_open_cached(state, fmode, open_mode)) {
|
|
- spin_lock(&state->owner->so_lock);
|
|
|
|
- if (can_open_cached(state, fmode, open_mode)) {
|
|
|
|
- update_open_stateflags(state, fmode);
|
|
|
|
- spin_unlock(&state->owner->so_lock);
|
|
|
|
- goto out_return_state;
|
|
|
|
- }
|
|
|
|
|
|
+ update_open_stateflags(state, fmode);
|
|
spin_unlock(&state->owner->so_lock);
|
|
spin_unlock(&state->owner->so_lock);
|
|
|
|
+ goto out_return_state;
|
|
}
|
|
}
|
|
|
|
+ spin_unlock(&state->owner->so_lock);
|
|
rcu_read_lock();
|
|
rcu_read_lock();
|
|
delegation = rcu_dereference(nfsi->delegation);
|
|
delegation = rcu_dereference(nfsi->delegation);
|
|
if (!can_open_delegated(delegation, fmode)) {
|
|
if (!can_open_delegated(delegation, fmode)) {
|