linux-next: manual merge of the vfs-brauner tree with the exfat tree
Subsystems (2)
Mark Brown
maintainerHi all,
Today's linux-next merge of the vfs-brauner tree got a conflict in:
fs/exfat/inode.c
between commit:
cca94c25250a1 ("exfat: don't map EXFAT_EOF_CLUSTER as a physical cluster")
from the exfat tree and commit:
788f21d1f1923 ("exfat: don't set SB_RDONLY after filesystem errors")
from the vfs-brauner tree. A bit unsure about this one, the actual conflict is exfat_writepages().
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.
fs/exfat/inode.c +0 -0
@@@ -114,8 -114,9 +114,9 @@@ int exfat_write_inode(struct inode *ino{ int ret; - if (unlikely(exfat_forced_shutdown(inode->i_sb))) -return -EIO; +ret = exfat_emergency_state(inode->i_sb); +if (unlikely(ret)) +return ret; mutex_lock(&EXFAT_SB(inode->i_sb)->s_lock); ret = __exfat_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL); * Input: inode, (logical) clu_offset, target allocation area * Output: errcode, cluster number * *clu = (~0), if it's unable to allocate a new cluster + * + * For !create, *count is limited to the part of the range backed by the + * cluster chain; the caller reports the remainder as a hole. */ int exfat_map_cluster (struct inode *inode,unsigned int clu_offset,unsigned int *clu,unsigned int *count,int create, *count > num_clusters - clu_offset) num_to_be_allocated = clu_offset + *count - num_clusters; - if (!create && (num_to_be_allocated > 0)) { - *clu =EXFAT_EOF_CLUSTER ; - return 0; + if (!create && num_to_be_allocated > 0) { + if (clu_offset >= num_clusters) { + *clu =EXFAT_EOF_CLUSTER ; + return 0; + } + +/* Range straddles the chain end: map the valid prefix only. */ + *count = num_clusters - clu_offset; + num_to_be_allocated =0 ; } *clu = last_clu = ei->start_clu; .wbc = wbc, .ops = &exfat_writeback_ops, }; - int ret; - - ret =exfat_emergency_state (mapping->host->i_sb); - if (unlikely(ret)) - return ret;return iomap_writepages (&wpc); }
Quoted 2 lines · Mark Brown
from the vfs-brauner tree. A bit unsure about this one, the actual conflict is
exfat_writepages().
Thanks for fixing this up. Dropping the check from exfat_writepages() is right. There's a small fixup needed on top of your resolution:
fs/exfat/file.c +0 -3
@@ -1002,9 +1002,6 @@ static vm_fault_t exfat_page_mkwrite(struct vm_fault *vmf)if (unlikely (err))return vmf_fs_error (err); -if (exfat_forced_shutdown (inode->i_sb)) -return vmf_fs_error (-EIO ); -if (!inode_trylock (inode))return VM_FAULT_RETRY ;
fs/exfat/iomap.c +4 -2
@@ -250,9 +250,11 @@ static ssize_t exfat_writeback_range(struct iomap_writepage_ctx *wpc, struct folio *folio, u64 offset, unsigned int len, u64 end_pos) { struct inode *inode = wpc->inode; +int err; -if (exfat_forced_shutdown (inode->i_sb)) -return -EIO ; + err =exfat_emergency_state (inode->i_sb); +if (unlikely (err)) +return err;if (offset < wpc->iomap.offset || offset >= wpc->iomap.offset + wpc->iomap.length) {
Thanks!
Mark Brown
maintainerQuoted 6 lines · Christian Brauner
Quoted 2 lines · Mark Brown
from the vfs-brauner tree. A bit unsure about this one, the actual conflict is
exfat_writepages().Thanks for fixing this up. Dropping the check from
exfat_writepages()is right. There's a small fixup needed on top of your resolution:
I'll add that, thanks - it's applied as a final commit today.