diff options
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index a85138ef67ad..5d7ffbfc3483 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -375,10 +375,11 @@ void nfs4_close_state(struct path *path, struct nfs4_state *state, mode_t mode) | |||
375 | spin_unlock(&inode->i_lock); | 375 | spin_unlock(&inode->i_lock); |
376 | spin_unlock(&owner->so_lock); | 376 | spin_unlock(&owner->so_lock); |
377 | 377 | ||
378 | if (oldstate != newstate && nfs4_do_close(path, state) == 0) | 378 | if (oldstate == newstate) { |
379 | return; | 379 | nfs4_put_open_state(state); |
380 | nfs4_put_open_state(state); | 380 | nfs4_put_state_owner(owner); |
381 | nfs4_put_state_owner(owner); | 381 | } else |
382 | nfs4_do_close(path, state); | ||
382 | } | 383 | } |
383 | 384 | ||
384 | /* | 385 | /* |