diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index fc8aff4767d3fc8d46a4d70ca52cf59e0866ac58..2d88c805a56c430412bfd8b8b44f01284926fdf2 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -350,10 +350,10 @@ static int copy_user_to_page_vector(struct page **pages,
 			return -EFAULT;
 		data += l - bad;
 		left -= l - bad;
-		if (po) {
-			po += l - bad;
-			if (po == PAGE_CACHE_SIZE)
-				po = 0;
+		po += l - bad;
+		if (po == PAGE_CACHE_SIZE) {
+			po = 0;
+			i++;
 		}
 	}
 	return len;