]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 3 Feb 2016 21:23:21 +0000 (16:23 -0500)
commitf3eaec38506470d74a642b9aa518ed1fd6849b57
tree10153a9595848a1b0f4795fd72dec7cec848a6ea
parentc98b306e392edc0898a1dd715761998222c19676
btrfs: put delayed item hook into inode

[ Upstream commit 8089fe62c6603860f6796ca80519b92391292f21 ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/inode.c