aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/btrfs_inode.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-11-19 14:15:51 +0100
committerDavid Sterba <dsterba@suse.com>2016-01-07 14:26:58 +0100
commit8089fe62c6603860f6796ca80519b92391292f21 (patch)
treeda517c3481f00b43a364ad14c51d496d73fcdf77 /fs/btrfs/btrfs_inode.h
parentbtrfs: Support convert to -d dup for btrfs-convert (diff)
downloadlinux-dev-8089fe62c6603860f6796ca80519b92391292f21.tar.xz
linux-dev-8089fe62c6603860f6796ca80519b92391292f21.zip
btrfs: put delayed item hook into inode
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 <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r--fs/btrfs/btrfs_inode.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 0ef5cc13fae2..61205e3bbefa 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -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;
};