From 022f3e2ee2354599faccf5a764a5a24a5dd194c9 Mon Sep 17 00:00:00 2001 From: Henry C Chang Date: Tue, 19 Mar 2013 09:46:26 +0800 Subject: [PATCH] ceph: fix buffer pointer advance in ceph_sync_write We should advance the user data pointer by _len_ instead of _written_. _len_ is the data length written in each iteration while _written_ is the accumulated data length we have writtent out. Signed-off-by: Henry C Chang Reviewed-by: Greg Farnum Tested-by: Sage Weil --- fs/ceph/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 0ac6e159bdc6..aeafa67bfe99 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -611,7 +611,7 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data, pos += len; written += len; left -= len; - data += written; + data += len; if (left) goto more; -- GitLab