Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4ab9ea7 authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason
Browse files

Btrfs: iput inode on allocation failure



We don't do the iput when we fail to allocate our delayed delalloc work in
__start_delalloc_inodes, fix this.

Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 363e4d35
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -8216,6 +8216,10 @@ static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput)

		work = btrfs_alloc_delalloc_work(inode, 0, delay_iput);
		if (unlikely(!work)) {
			if (delay_iput)
				btrfs_add_delayed_iput(inode);
			else
				iput(inode);
			ret = -ENOMEM;
			goto out;
		}