]> git.hungrycats.org Git - linux/commit
btrfs: put delayed item hook into inode
authorDavid Sterba <dsterba@suse.cz>
Thu, 19 Nov 2015 13:15:51 +0000 (14:15 +0100)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Tue, 19 Jan 2016 05:24:32 +0000 (00:24 -0500)
commitd644d76dfda5bb1de08e9e1389fb8d3afaf54036
treed65888be136aa98e5e7e4d7e3996f08083e16d13
parentf916fdc7560e2d7098db8516392d04c2a18944a2
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>
(cherry picked from commit 8089fe62c6603860f6796ca80519b92391292f21)
(cherry picked from commit 3616085484c55f178fd97e1842af3910022156aa)
fs/btrfs/btrfs_inode.h
fs/btrfs/inode.c