Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fs: Drop mapping_metadata_bhs from address space

Nobody uses mapping_metadata_bhs in struct address_space anymore. Just
remove it and with it all helper functions using it.

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260326095354.16340-83-jack@suse.cz
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Jan Kara and committed by
Christian Brauner
cb6d109b 41189b49

-32
-3
fs/inode.c
··· 276 276 277 277 mapping->a_ops = &empty_aops; 278 278 mapping->host = inode; 279 - mapping->i_metadata_bhs.mapping = mapping; 280 279 mapping->flags = 0; 281 280 mapping->wb_err = 0; 282 281 atomic_set(&mapping->i_mmap_writable, 0); ··· 483 484 init_rwsem(&mapping->i_mmap_rwsem); 484 485 INIT_LIST_HEAD(&mapping->i_private_list); 485 486 spin_lock_init(&mapping->i_private_lock); 486 - spin_lock_init(&mapping->i_metadata_bhs.lock); 487 - INIT_LIST_HEAD(&mapping->i_metadata_bhs.list); 488 487 mapping->i_mmap = RB_ROOT_CACHED; 489 488 } 490 489
-28
include/linux/buffer_head.h
··· 207 207 208 208 /* Things to do with metadata buffers list */ 209 209 void mmb_mark_buffer_dirty(struct buffer_head *bh, struct mapping_metadata_bhs *mmb); 210 - static inline void mark_buffer_dirty_inode(struct buffer_head *bh, 211 - struct inode *inode) 212 - { 213 - mmb_mark_buffer_dirty(bh, &inode->i_data.i_metadata_bhs); 214 - } 215 210 int mmb_fsync_noflush(struct file *file, struct mapping_metadata_bhs *mmb, 216 211 loff_t start, loff_t end, bool datasync); 217 - static inline int generic_buffers_fsync_noflush(struct file *file, 218 - loff_t start, loff_t end, 219 - bool datasync) 220 - { 221 - return mmb_fsync_noflush(file, &file->f_mapping->i_metadata_bhs, 222 - start, end, datasync); 223 - } 224 212 int mmb_fsync(struct file *file, struct mapping_metadata_bhs *mmb, 225 213 loff_t start, loff_t end, bool datasync); 226 - static inline int generic_buffers_fsync(struct file *file, 227 - loff_t start, loff_t end, bool datasync) 228 - { 229 - return mmb_fsync(file, &file->f_mapping->i_metadata_bhs, 230 - start, end, datasync); 231 - } 232 214 void clean_bdev_aliases(struct block_device *bdev, sector_t block, 233 215 sector_t len); 234 216 static inline void clean_bdev_bh_alias(struct buffer_head *bh) ··· 519 537 bool mmb_has_buffers(struct mapping_metadata_bhs *mmb); 520 538 void mmb_invalidate(struct mapping_metadata_bhs *mmb); 521 539 int mmb_sync(struct mapping_metadata_bhs *mmb); 522 - static inline void invalidate_inode_buffers(struct inode *inode) 523 - { 524 - mmb_invalidate(&inode->i_data.i_metadata_bhs); 525 - } 526 - static inline int sync_mapping_buffers(struct address_space *mapping) 527 - { 528 - return mmb_sync(&mapping->i_metadata_bhs); 529 - } 530 540 void invalidate_bh_lrus(void); 531 541 void invalidate_bh_lrus_cpu(void); 532 542 bool has_bh_in_lru(int cpu, void *dummy); ··· 529 555 static inline void buffer_init(void) {} 530 556 static inline bool try_to_free_buffers(struct folio *folio) { return true; } 531 557 static inline int mmb_sync(struct mapping_metadata_bhs *mmb) { return 0; } 532 - static inline void invalidate_inode_buffers(struct inode *inode) {} 533 - static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; } 534 558 static inline void invalidate_bh_lrus(void) {} 535 559 static inline void invalidate_bh_lrus_cpu(void) {} 536 560 static inline bool has_bh_in_lru(int cpu, void *dummy) { return false; }
-1
include/linux/fs.h
··· 491 491 errseq_t wb_err; 492 492 spinlock_t i_private_lock; 493 493 struct list_head i_private_list; 494 - struct mapping_metadata_bhs i_metadata_bhs; 495 494 struct rw_semaphore i_mmap_rwsem; 496 495 } __attribute__((aligned(sizeof(long)))) __randomize_layout; 497 496 /*