* recovering after a network partition or a reboot from a
* server that doesn't support a grace period.
*/
+restart:
+ spin_lock(&sp->so_lock);
list_for_each_entry(state, &sp->so_states, open_states) {
if (!test_and_clear_bit(ops->state_flag_bit, &state->flags))
continue;
if (state->state == 0)
continue;
+ atomic_inc(&state->count);
+ spin_unlock(&sp->so_lock);
status = ops->recover_open(sp, state);
if (status >= 0) {
status = nfs4_reclaim_locks(state, ops);
printk("%s: Lock reclaim failed!\n",
__func__);
}
- continue;
+ nfs4_put_open_state(state);
+ goto restart;
}
}
switch (status) {
case -NFS4ERR_STALE_CLIENTID:
goto out_err;
}
+ nfs4_put_open_state(state);
+ goto restart;
}
+ spin_unlock(&sp->so_lock);
return 0;
out_err:
+ nfs4_put_open_state(state);
return status;
}