dlm: fix plock dev_write return value
authorDavid Teigland <teigland@redhat.com>
Tue, 13 May 2008 19:28:26 +0000 (14:28 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 19 May 2008 20:37:27 +0000 (15:37 -0500)
The return value on writes to the plock device should be
the number of bytes written.  It was returning 0 instead
when an nfs lock callback was involved.

Reported-by: Nathan Straz <nstraz@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/plock.c

index d6d6e370f89c43fe3e9a89cdf4fb2d0101b39f67..78878c5781cadc0d13846d8af6a993039d8b39e6 100644 (file)
@@ -379,7 +379,7 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count,
                struct plock_xop *xop;
                xop = (struct plock_xop *)op;
                if (xop->callback)
-                       count = dlm_plock_callback(op);
+                       dlm_plock_callback(op);
                else
                        wake_up(&recv_wq);
        } else