Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
"I have two more small fixes this week:

Qu's fix avoids unneeded COW during fallocate, and Christian found a
memory leak in the error handling of an earlier fix"

* 'for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
btrfs: fix possible leak in btrfs_ioctl_balance()
btrfs: Avoid truncate tailing page if fallocate range doesn't exceed inode size

+5 -2
+1 -1
fs/btrfs/file.c
··· 2584 2584 alloc_start); 2585 2585 if (ret) 2586 2586 goto out; 2587 - } else { 2587 + } else if (offset + len > inode->i_size) { 2588 2588 /* 2589 2589 * If we are fallocating from the end of the file onward we 2590 2590 * need to zero out the end of the page if i_size lands in the
+4 -1
fs/btrfs/ioctl.c
··· 4641 4641 4642 4642 if (bctl->flags & ~(BTRFS_BALANCE_ARGS_MASK | BTRFS_BALANCE_TYPE_MASK)) { 4643 4643 ret = -EINVAL; 4644 - goto out_bargs; 4644 + goto out_bctl; 4645 4645 } 4646 4646 4647 4647 do_balance: ··· 4655 4655 need_unlock = false; 4656 4656 4657 4657 ret = btrfs_balance(bctl, bargs); 4658 + bctl = NULL; 4658 4659 4659 4660 if (arg) { 4660 4661 if (copy_to_user(arg, bargs, sizeof(*bargs))) 4661 4662 ret = -EFAULT; 4662 4663 } 4663 4664 4665 + out_bctl: 4666 + kfree(bctl); 4664 4667 out_bargs: 4665 4668 kfree(bargs); 4666 4669 out_unlock: