summaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 3d6dcf23b4ad..47826c2ef511 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -540,9 +540,6 @@ more:
if (IS_ERR(req))
return PTR_ERR(req);
- ceph_osdc_build_request(req, pos, num_ops, ops,
- snapc, vino.snap, &mtime);
-
/* write from beginning of first page, regardless of io alignment */
page_align = file->f_flags & O_DIRECT ? buf_align : io_align;
num_pages = calc_pages_for(page_align, len);
@@ -583,6 +580,10 @@ more:
req->r_data_out.alignment = page_align;
req->r_inode = inode;
+ /* BUG_ON(vino.snap != CEPH_NOSNAP); */
+ ceph_osdc_build_request(req, pos, num_ops, ops,
+ snapc, vino.snap, &mtime);
+
ret = ceph_osdc_start_request(&fsc->client->osdc, req, false);
if (!ret) {
if (req->r_safe_callback) {