linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the iomap tree with the f2fs tree
@ 2020-01-06 23:19 Stephen Rothwell
  0 siblings, 0 replies; only message in thread
From: Stephen Rothwell @ 2020-01-06 23:19 UTC (permalink / raw)
  To: Darrick J. Wong, Jaegeuk Kim
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Andreas Gruenbacher, Chao Yu

[-- Attachment #1: Type: text/plain, Size: 2509 bytes --]

Hi all,

Today's linux-next merge of the iomap tree got a conflict in:

  fs/f2fs/file.c

between commits:

  bdf032992489 ("f2fs: call f2fs_balance_fs outside of locked page")
  df4d07124128 ("f2fs: support data compression")

from the f2fs tree and commit:

  4a58d8158f6d ("fs: Fix page_mkwrite off-by-one errors")

from the iomap tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/f2fs/file.c
index bde5612f37f5,0e77b2e6f873..000000000000
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@@ -50,9 -50,8 +50,10 @@@ static vm_fault_t f2fs_vm_page_mkwrite(
  	struct page *page = vmf->page;
  	struct inode *inode = file_inode(vmf->vma->vm_file);
  	struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
 -	struct dnode_of_data dn = { .node_changed = false };
 -	int offset, err;
 +	struct dnode_of_data dn;
 +	bool need_alloc = true;
 +	int err = 0;
++	int offset;
  
  	if (unlikely(f2fs_cp_error(sbi))) {
  		err = -EIO;
@@@ -88,25 -70,24 +89,26 @@@
  	file_update_time(vmf->vma->vm_file);
  	down_read(&F2FS_I(inode)->i_mmap_sem);
  	lock_page(page);
- 	if (unlikely(page->mapping != inode->i_mapping ||
- 			page_offset(page) > i_size_read(inode) ||
- 			!PageUptodate(page))) {
+ 	err = -EFAULT;
+ 	if (likely(PageUptodate(page)))
+ 		err = page_mkwrite_check_truncate(page, inode);
+ 	if (unlikely(err < 0)) {
  		unlock_page(page);
- 		err = -EFAULT;
  		goto out_sem;
  	}
+ 	offset = err;
  
 -	/* block allocation */
 -	__do_map_lock(sbi, F2FS_GET_BLOCK_PRE_AIO, true);
 -	set_new_dnode(&dn, inode, NULL, NULL, 0);
 -	err = f2fs_get_block(&dn, page->index);
 -	f2fs_put_dnode(&dn);
 -	__do_map_lock(sbi, F2FS_GET_BLOCK_PRE_AIO, false);
 -	if (err) {
 -		unlock_page(page);
 -		goto out_sem;
 +	if (need_alloc) {
 +		/* block allocation */
 +		__do_map_lock(sbi, F2FS_GET_BLOCK_PRE_AIO, true);
 +		set_new_dnode(&dn, inode, NULL, NULL, 0);
 +		err = f2fs_get_block(&dn, page->index);
 +		f2fs_put_dnode(&dn);
 +		__do_map_lock(sbi, F2FS_GET_BLOCK_PRE_AIO, false);
 +		if (err) {
 +			unlock_page(page);
 +			goto out_sem;
 +		}
  	}
  
  	/* fill the page */

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-06 23:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-06 23:19 linux-next: manual merge of the iomap tree with the f2fs tree Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).