Subject: linux-next: manual merge of the fscache tree with Linus' tree

From: Stephen Rothwell <[email-masked]>
Date: Thu, 25 Mar 2021 10:36:34 +1100

Hi all,

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

  fs/afs/write.c

between commit:

  75b69799610c ("afs: Use wait_on_page_writeback_killable")

from Linus' tree and commit:

  721597fd1aa6 ("afs: Prepare for use of THPs")

from the fscache 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/afs/write.c
index eb737ed63afb,b2e03de09c24..000000000000
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@@ -848,13 -845,16 +845,15 @@@ vm_fault_t afs_page_mkwrite(struct vm_f
  	 * be modified.  We then assume the entire page will need writing back.
  	 */
  #ifdef CONFIG_AFS_FSCACHE
- 	fscache_wait_on_page_write(vnode->cache, vmf->page);
+ 	if (PageFsCache(page) &&
+ 	    wait_on_page_bit_killable(page, PG_fscache) < 0)
+ 		return VM_FAULT_RETRY;
  #endif
  
- 	if (wait_on_page_writeback_killable(vmf->page))
 -	if (PageWriteback(page) &&
 -	    wait_on_page_bit_killable(page, PG_writeback) < 0)
++	if (wait_on_page_writeback_killable(page))
  		return VM_FAULT_RETRY;
  
- 	if (lock_page_killable(vmf->page) < 0)
+ 	if (lock_page_killable(page) < 0)
  		return VM_FAULT_RETRY;
  
  	/* We mustn't change page->private until writeback is complete as that