btrfs: put delayed item hook into inode
David Sterba
maintainerPATCH 1/1 btrfs: put delayed item hook into inode
From: David Sterba <[email protected]>
Inodes for delayed iput allocate a trivial helper structure, let's place the list hook directly into the inode and save a kmalloc (killing a __GFP_NOFAIL as a bonus) at the cost of increasing size of btrfs_inode.
The inode can be put into the delayed_iputs list more than once and we have to keep the count. This means we can't use the list_splice to process a bunch of inodes because we'd lost track of the count if the inode is put into the delayed iputs again while it's processed.
Signed-off-by David Sterba <[email protected]>
--- fs/btrfs/btrfs_inode.h | 4 ++++ fs/btrfs/inode.c | 56 ++++++++++++++++++++++---------------------------- 2 files changed, 29 insertions(+), 31 deletions(-)
fs/btrfs/btrfs_inode.h +4 -0
@@ -192,6 +192,10 @@ struct btrfs_inode {/* File creation time. */ struct timespec i_otime; +/* Hook into fs_info->delayed_iputs */ +struct list_head delayed_iput; +long delayed_iput_count; +struct inode vfs_inode; };
fs/btrfs/inode.c +25 -31
92 lines not on this page · raw message
Signature · 1 line
2.6.2