Merge branch 'for_rmk' of git://github.com/at91linux/linux-2.6-at91 into devel-stable
[pandora-kernel.git] / fs / nfs / nfs4renewd.c
index 72b6c58..402143d 100644 (file)
@@ -63,9 +63,14 @@ nfs4_renew_state(struct work_struct *work)
 
        ops = clp->cl_mvops->state_renewal_ops;
        dprintk("%s: start\n", __func__);
-       /* Are there any active superblocks? */
-       if (list_empty(&clp->cl_superblocks))
+
+       rcu_read_lock();
+       if (list_empty(&clp->cl_superblocks)) {
+               rcu_read_unlock();
                goto out;
+       }
+       rcu_read_unlock();
+
        spin_lock(&clp->cl_lock);
        lease = clp->cl_lease_time;
        last = clp->cl_last_renewal;
@@ -75,7 +80,7 @@ nfs4_renew_state(struct work_struct *work)
                cred = ops->get_state_renewal_cred_locked(clp);
                spin_unlock(&clp->cl_lock);
                if (cred == NULL) {
-                       if (list_empty(&clp->cl_delegations)) {
+                       if (!nfs_delegations_present(clp)) {
                                set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
                                goto out;
                        }