diff options
Diffstat (limited to 'fs/nfs/nfs4renewd.c')
-rw-r--r-- | fs/nfs/nfs4renewd.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c index 72b6c580af13..402143d75fc5 100644 --- a/fs/nfs/nfs4renewd.c +++ b/fs/nfs/nfs4renewd.c | |||
@@ -63,9 +63,14 @@ nfs4_renew_state(struct work_struct *work) | |||
63 | 63 | ||
64 | ops = clp->cl_mvops->state_renewal_ops; | 64 | ops = clp->cl_mvops->state_renewal_ops; |
65 | dprintk("%s: start\n", __func__); | 65 | dprintk("%s: start\n", __func__); |
66 | /* Are there any active superblocks? */ | 66 | |
67 | if (list_empty(&clp->cl_superblocks)) | 67 | rcu_read_lock(); |
68 | if (list_empty(&clp->cl_superblocks)) { | ||
69 | rcu_read_unlock(); | ||
68 | goto out; | 70 | goto out; |
71 | } | ||
72 | rcu_read_unlock(); | ||
73 | |||
69 | spin_lock(&clp->cl_lock); | 74 | spin_lock(&clp->cl_lock); |
70 | lease = clp->cl_lease_time; | 75 | lease = clp->cl_lease_time; |
71 | last = clp->cl_last_renewal; | 76 | last = clp->cl_last_renewal; |
@@ -75,7 +80,7 @@ nfs4_renew_state(struct work_struct *work) | |||
75 | cred = ops->get_state_renewal_cred_locked(clp); | 80 | cred = ops->get_state_renewal_cred_locked(clp); |
76 | spin_unlock(&clp->cl_lock); | 81 | spin_unlock(&clp->cl_lock); |
77 | if (cred == NULL) { | 82 | if (cred == NULL) { |
78 | if (list_empty(&clp->cl_delegations)) { | 83 | if (!nfs_delegations_present(clp)) { |
79 | set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); | 84 | set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); |
80 | goto out; | 85 | goto out; |
81 | } | 86 | } |