]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/lockd/clntlock.c
LOCKD: Ensure that nlmclnt_block resets block->b_status after a server reboot
[karo-tx-linux.git] / fs / lockd / clntlock.c
index 0796c45d0d4d0795420743f104dc4e76e0cebd14..01bfe76627516d836241b249bdeac7b0a02b0f97 100644 (file)
@@ -144,6 +144,9 @@ int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout)
                        timeout);
        if (ret < 0)
                return -ERESTARTSYS;
+       /* Reset the lock status after a server reboot so we resend */
+       if (block->b_status == nlm_lck_denied_grace_period)
+               block->b_status = nlm_lck_blocked;
        req->a_res.status = block->b_status;
        return 0;
 }