]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: put delayed item hook into inode
authorDavid Sterba <dsterba@suse.cz>
Thu, 19 Nov 2015 13:15:51 +0000 (14:15 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 7 Jan 2016 13:26:58 +0000 (14:26 +0100)
commita295af3436eacc7d3e72d92467f0c4d5c124853a
treeda517c3481f00b43a364ad14c51d496d73fcdf77
parent1a1306d114a6cf0b61f3b9eec3891dc9cadef72e
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>
fs/btrfs/btrfs_inode.h
fs/btrfs/inode.c