summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2013-10-31 17:03:04 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-29 19:28:03 (GMT)
commit611774299106c972d60c98d99563b8682da4381b (patch)
treea1bbc2a2d5222be22cd02066201983cd332fc7dc /fs/nfs
parentcdebf3915aa50f87f43da89415de6543cfea5f66 (diff)
downloadlinux-fsl-qoriq-611774299106c972d60c98d99563b8682da4381b.tar.xz
nfs: fix inverted test for delegation in nfs4_reclaim_open_state
commit 1acd1c301f4faae80f4d2c7bbd9a4553b131c0e3 upstream. commit 6686390bab6a0e0 (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: Jeff Layton <jlayton@redhat.com> Fixes: 6686390bab6a: NFS: remove incorrect "Lock reclaim failed!" warning. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index cc14cbb..09448e6 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1422,7 +1422,7 @@ restart:
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))