summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2022-11-02 15:46:36 +0300
committerDavid Sterba <dsterba@suse.com>2022-11-02 19:44:45 +0300
commiteb81b682b131642405a05c627ab08cf0967b3dd8 (patch)
treecf1bce6e7a525a86fb8578a0bbeb7dba9dc79de8 /fs/btrfs/inode.c
parenta348c8d4f6cf23ef04b0edaccdfe9d94c2d335db (diff)
downloadlinux-eb81b682b131642405a05c627ab08cf0967b3dd8.tar.xz
btrfs: fix inode reserve space leak due to nowait buffered write
During a nowait buffered write, if we fail to balance dirty pages we exit btrfs_buffered_write() without releasing the delalloc space reserved for an extent, resulting in leaking space from the inode's block reserve. So fix that by releasing the delalloc space for the extent when balancing dirty pages fails. Reported-by: kernel test robot <yujie.liu@intel.com> Link: https://lore.kernel.org/all/202210111304.d369bc32-yujie.liu@intel.com Fixes: 965f47aeb5de ("btrfs: make btrfs_buffered_write nowait compatible") Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
0 files changed, 0 insertions, 0 deletions