NLM/lockd: remove b_done
authorJ. Bruce Fields <bfields@fieldses.org>
Thu, 3 Aug 2006 19:07:47 +0000 (15:07 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 3 Aug 2006 20:56:02 +0000 (16:56 -0400)
We never actually set the b_done field any more; it's always zero.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
(cherry picked from af8412d4283ef91356e65e0ed9b025b376aebded commit)

fs/lockd/svclock.c
include/linux/lockd/lockd.h

index baf5ae513481f97ade8d76d73a2079dcdfe5dc58..c9d419703cf30b35daa6fcf17609b948f465b4a0 100644 (file)
@@ -638,9 +638,6 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data)
        if (task->tk_status < 0) {
                /* RPC error: Re-insert for retransmission */
                timeout = 10 * HZ;
-       } else if (block->b_done) {
-               /* Block already removed, kill it for real */
-               timeout = 0;
        } else {
                /* Call was successful, now wait for client callback */
                timeout = 60 * HZ;
@@ -709,13 +706,10 @@ nlmsvc_retry_blocked(void)
                        break;
                if (time_after(block->b_when,jiffies))
                        break;
-               dprintk("nlmsvc_retry_blocked(%p, when=%ld, done=%d)\n",
-                       block, block->b_when, block->b_done);
+               dprintk("nlmsvc_retry_blocked(%p, when=%ld)\n",
+                       block, block->b_when);
                kref_get(&block->b_count);
-               if (block->b_done)
-                       nlmsvc_unlink_block(block);
-               else
-                       nlmsvc_grant_blocked(block);
+               nlmsvc_grant_blocked(block);
                nlmsvc_release_block(block);
        }
 
index aa4fe905bb4dada8f1ce710e44333923b292300b..0d92c468d55aeeb1f4b83e5847ef3bc5c529b2b7 100644 (file)
@@ -123,7 +123,6 @@ struct nlm_block {
        unsigned int            b_id;           /* block id */
        unsigned char           b_queued;       /* re-queued */
        unsigned char           b_granted;      /* VFS granted lock */
-       unsigned char           b_done;         /* callback complete */
        struct nlm_file *       b_file;         /* file in question */
 };