Subject: linux-next: manual merge of the security tree with the vfs-brauner tree

From: Mark Brown <[email-masked]>
Date: Mon, 6 Apr 2026 15:05:39 +0100

Hi all,

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

  fs/file_table.c

between commit:

  1f1651d6dc2ac ("fs: hide file and bfile caches behind runtime const machinery")

from the vfs-brauner tree and commit:

  fbec24706feb2 ("fs: prepare for adding LSM blob to backing_file")

from the security 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/file_table.c
index c40ec1be28992,d19d879b6efc1..0000000000000
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@@ -70,6 -69,25 +73,25 @@@ void backing_file_set_user_path(struct 
  }
  EXPORT_SYMBOL_GPL(backing_file_set_user_path);
  
+ #ifdef CONFIG_SECURITY
+ void *backing_file_security(const struct file *f)
+ {
+ 	return backing_file(f)->security;
+ }
+ 
+ void backing_file_set_security(struct file *f, void *security)
+ {
+ 	backing_file(f)->security = security;
+ }
+ #endif /* CONFIG_SECURITY */
+ 
+ static inline void backing_file_free(struct backing_file *ff)
+ {
+ 	security_backing_file_free(&ff->file);
+ 	path_put(&ff->user_path);
 -	kmem_cache_free(bfilp_cachep, ff);
++	kmem_cache_free(bfilp_cache, ff);
+ }
+ 
  static inline void file_free(struct file *f)
  {
  	security_file_free(f);
@@@ -77,10 -95,9 +99,9 @@@
  		percpu_counter_dec(&nr_files);
  	put_cred(f->f_cred);
  	if (unlikely(f->f_mode & FMODE_BACKING)) {
- 		path_put(backing_file_user_path(f));
- 		kmem_cache_free(bfilp_cache, backing_file(f));
+ 		backing_file_free(backing_file(f));
  	} else {
 -		kmem_cache_free(filp_cachep, f);
 +		kmem_cache_free(filp_cache, f);
  	}
  }