提交 1acd1c30 编写于 作者: J Jeff Layton 提交者: Trond Myklebust

nfs: fix inverted test for delegation in nfs4_reclaim_open_state

commit 6686390b (NFS: remove incorrect "Lock reclaim failed!"
warning.) added a test for a delegation before checking to see if any
reclaimed locks failed. The test however is backward and is only doing
that check when a delegation is held instead of when one isn't.

Cc: NeilBrown <neilb@suse.de>
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Fixes: 6686390b: NFS: remove incorrect "Lock reclaim failed!" warning.
Cc: stable@vger.kernel.org # 3.12
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 a1311d87
......@@ -1476,7 +1476,7 @@ static int nfs4_reclaim_open_state(struct nfs4_state_owner *sp, const struct nfs
if (status >= 0) {
status = nfs4_reclaim_locks(state, ops);
if (status >= 0) {
if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0) {
if (!test_bit(NFS_DELEGATED_STATE, &state->flags)) {
spin_lock(&state->state_lock);
list_for_each_entry(lock, &state->lock_states, ls_locks) {
if (!test_bit(NFS_LOCK_INITIALIZED, &lock->ls_flags))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册