aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ceph/addr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index b7d218a168fb..ce3c773726c5 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -1378,11 +1378,13 @@ static int ceph_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
1378 1378
1379 ret = VM_FAULT_NOPAGE; 1379 ret = VM_FAULT_NOPAGE;
1380 if ((off > size) || 1380 if ((off > size) ||
1381 (page->mapping != inode->i_mapping)) 1381 (page->mapping != inode->i_mapping)) {
1382 unlock_page(page);
1382 goto out; 1383 goto out;
1384 }
1383 1385
1384 ret = ceph_update_writeable_page(vma->vm_file, off, len, page); 1386 ret = ceph_update_writeable_page(vma->vm_file, off, len, page);
1385 if (ret == 0) { 1387 if (ret >= 0) {
1386 /* success. we'll keep the page locked. */ 1388 /* success. we'll keep the page locked. */
1387 set_page_dirty(page); 1389 set_page_dirty(page);
1388 ret = VM_FAULT_LOCKED; 1390 ret = VM_FAULT_LOCKED;
@@ -1393,8 +1395,6 @@ static int ceph_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
1393 ret = VM_FAULT_SIGBUS; 1395 ret = VM_FAULT_SIGBUS;
1394 } 1396 }
1395out: 1397out:
1396 if (ret != VM_FAULT_LOCKED)
1397 unlock_page(page);
1398 if (ret == VM_FAULT_LOCKED || 1398 if (ret == VM_FAULT_LOCKED ||
1399 ci->i_inline_version != CEPH_INLINE_NONE) { 1399 ci->i_inline_version != CEPH_INLINE_NONE) {
1400 int dirty; 1400 int dirty;