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.

ext4: Use inode_has_buffers()

Instead of checking i_private_list directly use appropriate wrapper
inode_has_buffers(). Also delete stale comment.

Acked-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260326095354.16340-43-jack@suse.cz
Tested-by: syzbot@syzkaller.appspotmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Jan Kara and committed by
Christian Brauner
ab856368 1f318b96

+2 -4
+1
fs/buffer.c
··· 524 524 { 525 525 return !list_empty(&inode->i_data.i_private_list); 526 526 } 527 + EXPORT_SYMBOL_GPL(inode_has_buffers); 527 528 528 529 /* 529 530 * osync is designed to support O_SYNC io. It waits synchronously for
+1 -4
fs/ext4/inode.c
··· 1420 1420 /* 1421 1421 * We need to pick up the new inode size which generic_commit_write gave us 1422 1422 * `iocb` can be NULL - eg, when called from page_symlink(). 1423 - * 1424 - * ext4 never places buffers on inode->i_mapping->i_private_list. metadata 1425 - * buffers are managed internally. 1426 1423 */ 1427 1424 static int ext4_write_end(const struct kiocb *iocb, 1428 1425 struct address_space *mapping, ··· 3434 3437 } 3435 3438 3436 3439 /* Any metadata buffers to write? */ 3437 - if (!list_empty(&inode->i_mapping->i_private_list)) 3440 + if (inode_has_buffers(inode)) 3438 3441 return true; 3439 3442 return inode_state_read_once(inode) & I_DIRTY_DATASYNC; 3440 3443 }