Linux-Next discussions
 help / color / mirror / Atom feed
* linux-next: manual merge of the fs-next tree with the mm-nonmm-unstable tree
@ 2026-11-17 16:16 Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-11-17 16:16 UTC (permalink / raw)
  Cc: Andrew Morton, Chris Down, Christian Brauner,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  fs/proc/kcore.c

between commit:

  6b20f3da3436e ("proc/kcore: allow disabling /proc/kcore at boot")

from the mm-nonmm-unstable tree and commit:

  79011a80f0646 ("proc: give kcore, kmsg, the kpage files and profile their own file_operations")

from the fs-next 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.

diff --cc fs/proc/kcore.c
index 4251a9ef868b6,ab7b74efe9754..0000000000000
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@@ -723,20 -722,9 +723,20 @@@ static void __init add_modules_range(vo
  }
  #endif
  
 +static int __init parse_kcore(char *str)
 +{
 +	return kstrtobool(str, &kcore_enabled);
 +}
 +early_param("kcore", parse_kcore);
 +
  static int __init proc_kcore_init(void)
  {
 +	if (!kcore_enabled) {
 +		pr_info("/proc/kcore disabled on command line\n");
 +		return 0;
 +	}
 +
- 	proc_root_kcore = proc_create("kcore", S_IRUSR, NULL, &kcore_proc_ops);
+ 	proc_root_kcore = proc_create_fops("kcore", S_IRUSR, NULL, &kcore_fops);
  	if (!proc_root_kcore) {
  		pr_err("couldn't create /proc/kcore\n");
  		return 0; /* Always returns 0. */

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

^ permalink raw reply	[flat|nested] 7+ messages in thread
* linux-next: manual merge of the fs-next tree with the mm-nonmm-unstable tree
@ 2026-11-17 16:17 Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-11-17 16:17 UTC (permalink / raw)
  Cc: Andrew Morton, Christian Brauner, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

  kernel/profile.c

between commits:

  2ab6daee3c87d ("profile: account for partial /proc/profile reads")
  0ff0b873d4d93 ("profile: simplify /proc/profile read layout")

from the mm-nonmm-unstable tree and commit:

  79011a80f0646 ("proc: give kcore, kmsg, the kpage files and profile their own file_operations")

from the fs-next tree.  This essentially discards Andrew's changes, AIUI
the conversion to the iterator API ought to achieve roughly the same
thing though I may be misunderstanding.  I may also have messed up the
merge somewhere.

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.

diff --cc kernel/profile.c
index c6d5a2638a52e,c28386b6723bf..0000000000000
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@@ -150,55 -150,31 +150,28 @@@ void profile_tick(int type
   * buffer. Use of the program readprofile is recommended in order to
   * get meaningful info out of these data.
   */
- static ssize_t
- read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)
+ static ssize_t read_profile(struct kiocb *iocb, struct iov_iter *to)
  {
- 	const size_t header_size = sizeof(unsigned int);
- 	const size_t file_size = (prof_len + 1) * sizeof(unsigned int);
- 	unsigned int sample_step;
- 	loff_t offset = *ppos;
- 	size_t pos;
- 	size_t done = 0;
- 	size_t n, not_copied;
+ 	unsigned long p = iocb->ki_pos;
+ 	size_t count = iov_iter_count(to);
+ 	ssize_t read;
+ 	char *pnt;
+ 	unsigned int sample_step = (unsigned int)(1UL << prof_shift);
  
 -	if (p >= (prof_len+1)*sizeof(unsigned int))
 -		return 0;
 -	if (count > (prof_len+1)*sizeof(unsigned int) - p)
 -		count = (prof_len+1)*sizeof(unsigned int) - p;
 -	read = 0;
 +	/* Keep the shift word-sized before narrowing to the 32-bit ABI. */
 +	sample_step = (unsigned int)(1UL << prof_shift);
  
- 	if (offset < 0)
- 		return -EINVAL;
- 	if (offset >= file_size)
- 		return 0;
- 	pos = offset;
- 	count = min(count, file_size - pos);
- 
- 	/* Copy the four-byte sampling resolution. */
- 	if (pos < header_size) {
- 		n = min(count, header_size - pos);
- 		not_copied = copy_to_user(buf, (u8 *)&sample_step + pos, n);
- 		done += n - not_copied;
- 		if (not_copied)
- 			goto fault;
- 		buf += n;
- 		pos += n;
- 		count -= n;
+ 	while (p < sizeof(unsigned int) && count > 0) {
+ 		if (copy_to_iter((char *)(&sample_step)+p, 1, to) != 1)
+ 			return -EFAULT;
+ 		p++; count--; read++;
  	}
- 
- 	/* Copy raw counters using offsets relative to the counter array. */
- 	if (count) {
- 		not_copied = copy_to_user(buf,
- 					(u8 *)prof_buffer + pos - header_size,
- 					count);
- 		done += count - not_copied;
- 		if (not_copied)
- 			goto fault;
- 	}
- 	*ppos += done;
- 	return done;
- fault:
- 	*ppos += done;
- 	if (!done)
+ 	pnt = (char *)prof_buffer + p - sizeof(atomic_t);
+ 	if (copy_to_iter(pnt, count, to) != count)
  		return -EFAULT;
- 	return done;
+ 	read += count;
+ 	iocb->ki_pos += read;
+ 	return read;
  }
  
  /* default is to not implement this call */

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

^ permalink raw reply	[flat|nested] 7+ messages in thread
* linux-next: manual merge of the fs-next tree with the mm-nonmm-unstable tree
@ 2026-04-06 13:13 Mark Brown
  2026-04-06 16:25 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2026-04-06 13:13 UTC (permalink / raw)
  Cc: Andrew Morton, Christian Brauner, Jeff Layton, Joseph Qi,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  fs/ocfs2/dir.c

between commits:

  bdff37e327275 ("ocfs2: validate dx_root extent list fields during block read")
  28c33de101792 ("ocfs2: remove empty extent list check in ocfs2_dx_dir_lookup_rec()")

from the mm-nonmm-unstable tree and commit:

  0b2600f81cefc ("treewide: change inode->i_ino from unsigned long to u64")

from the fs-next 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.

diff --combined fs/ocfs2/dir.c
index d94595a499231,b82fe4431eb1f..0000000000000
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@@ -593,7 -593,7 +593,7 @@@ static int ocfs2_validate_dx_root(struc
  		mlog(ML_ERROR,
  		     "Checksum failed for dir index root block %llu\n",
  		     (unsigned long long)bh->b_blocknr);
 -		return ret;
 +		goto bail;
  	}
  
  	if (!OCFS2_IS_VALID_DX_ROOT(dx_root)) {
@@@ -601,32 -601,8 +601,32 @@@
  				  "Dir Index Root # %llu has bad signature %.*s\n",
  				  (unsigned long long)le64_to_cpu(dx_root->dr_blkno),
  				  7, dx_root->dr_signature);
 +		goto bail;
  	}
  
 +	if (!(dx_root->dr_flags & OCFS2_DX_FLAG_INLINE)) {
 +		struct ocfs2_extent_list *el = &dx_root->dr_list;
 +
 +		if (le16_to_cpu(el->l_count) != ocfs2_extent_recs_per_dx_root(sb)) {
 +			ret = ocfs2_error(sb,
 +					  "Dir Index Root # %llu has invalid l_count %u (expected %u)\n",
 +					  (unsigned long long)le64_to_cpu(dx_root->dr_blkno),
 +					  le16_to_cpu(el->l_count),
 +					  ocfs2_extent_recs_per_dx_root(sb));
 +			goto bail;
 +		}
 +
 +		if (le16_to_cpu(el->l_next_free_rec) > le16_to_cpu(el->l_count)) {
 +			ret = ocfs2_error(sb,
 +					  "Dir Index Root # %llu has invalid l_next_free_rec %u (l_count %u)\n",
 +					  (unsigned long long)le64_to_cpu(dx_root->dr_blkno),
 +					  le16_to_cpu(el->l_next_free_rec),
 +					  le16_to_cpu(el->l_count));
 +			goto bail;
 +		}
 +	}
 +
 +bail:
  	return ret;
  }
  
@@@ -815,6 -791,14 +815,6 @@@ static int ocfs2_dx_dir_lookup_rec(stru
  	struct ocfs2_extent_block *eb;
  	struct ocfs2_extent_rec *rec = NULL;
  
 -	if (le16_to_cpu(el->l_count) !=
 -	    ocfs2_extent_recs_per_dx_root(inode->i_sb)) {
 -		ret = ocfs2_error(inode->i_sb,
 -				  "Inode %llu has invalid extent list length %u\n",
 -				  inode->i_ino, le16_to_cpu(el->l_count));
 -		goto out;
 -	}
 -
  	if (el->l_tree_depth) {
  		ret = ocfs2_find_leaf(INODE_CACHE(inode), el, major_hash,
  				      &eb_bh);
@@@ -828,13 -812,21 +828,13 @@@
  
  		if (el->l_tree_depth) {
  			ret = ocfs2_error(inode->i_sb,
- 					  "Inode %lu has non zero tree depth in btree tree block %llu\n",
+ 					  "Inode %llu has non zero tree depth in btree tree block %llu\n",
  					  inode->i_ino,
  					  (unsigned long long)eb_bh->b_blocknr);
  			goto out;
  		}
  	}
  
 -	if (le16_to_cpu(el->l_next_free_rec) == 0) {
 -		ret = ocfs2_error(inode->i_sb,
 -				  "Inode %llu has empty extent list at depth %u\n",
 -				  inode->i_ino,
 -				  le16_to_cpu(el->l_tree_depth));
 -		goto out;
 -	}
 -
  	found = 0;
  	for (i = le16_to_cpu(el->l_next_free_rec) - 1; i >= 0; i--) {
  		rec = &el->l_recs[i];
@@@ -847,9 -839,10 +847,9 @@@
  
  	if (!found) {
  		ret = ocfs2_error(inode->i_sb,
- 				  "Inode %lu has no extent record for hash %u in btree (next_free_rec %u)\n",
 -				  "Inode %llu has bad extent record (%u, %u, 0) in btree\n",
 -				  inode->i_ino,
 -				  le32_to_cpu(rec->e_cpos),
 -				  ocfs2_rec_clusters(el, rec));
++				  "Inode %llu has no extent record for hash %u in btree (next_free_rec %u)\n",
 +				  inode->i_ino, major_hash,
 +				  le16_to_cpu(el->l_next_free_rec));
  		goto out;
  	}
  

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-17 16:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 16:16 linux-next: manual merge of the fs-next tree with the mm-nonmm-unstable tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2026-11-17 16:17 Mark Brown
2026-04-06 13:13 Mark Brown
2026-04-06 16:25 ` Andrew Morton
2026-04-07  2:19   ` Joseph Qi
2026-04-07  3:39     ` Andrew Morton
2026-04-07 10:54     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox