Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85cf0ac3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: fix whitespace coding style issues
  nilfs2: fix oops due to a bad aops initialization
  nilfs2: fix data loss in mmap page write for hole blocks
parents 50f35158 af71dda0
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -72,10 +72,9 @@ static int nilfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
	/*
	 * check to see if the page is mapped already (no holes)
	 */
	if (PageMappedToDisk(page)) {
		unlock_page(page);
	if (PageMappedToDisk(page))
		goto mapped;
	}

	if (page_has_buffers(page)) {
		struct buffer_head *bh, *head;
		int fully_mapped = 1;
@@ -90,7 +89,6 @@ static int nilfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)

		if (fully_mapped) {
			SetPageMappedToDisk(page);
			unlock_page(page);
			goto mapped;
		}
	}
@@ -105,16 +103,17 @@ static int nilfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
		return VM_FAULT_SIGBUS;

	ret = block_page_mkwrite(vma, vmf, nilfs_get_block);
	if (unlikely(ret)) {
	if (ret != VM_FAULT_LOCKED) {
		nilfs_transaction_abort(inode->i_sb);
		return ret;
	}
	nilfs_set_file_dirty(inode, 1 << (PAGE_SHIFT - inode->i_blkbits));
	nilfs_transaction_commit(inode->i_sb);

 mapped:
	SetPageChecked(page);
	wait_on_page_writeback(page);
	return 0;
	return VM_FAULT_LOCKED;
}

static const struct vm_operations_struct nilfs_file_vm_ops = {
+3 −1
Original line number Diff line number Diff line
@@ -495,12 +495,14 @@ unsigned nilfs_page_count_clean_buffers(struct page *page,
void nilfs_mapping_init(struct address_space *mapping,
			struct backing_dev_info *bdi)
{
	static const struct address_space_operations empty_aops;

	mapping->host = NULL;
	mapping->flags = 0;
	mapping_set_gfp_mask(mapping, GFP_NOFS);
	mapping->assoc_mapping = NULL;
	mapping->backing_dev_info = bdi;
	mapping->a_ops = NULL;
	mapping->a_ops = &empty_aops;
}

/*
+7 −7

File changed.

Contains only whitespace changes.