Skip to content

Commit

Permalink
Btrfs: return error code in btrfs_check_trunc_cache_free_space()
Browse files Browse the repository at this point in the history
Fix to return error code instead always return 0 from function
btrfs_check_trunc_cache_free_space().
Introduced by commit 7b61cd9
(Btrfs: don't use global block reservation for inode cache truncation)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
  • Loading branch information
Wei Yongjun authored and Josef Bacik committed Jun 14, 2013
1 parent 139f807 commit 4b286cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ int btrfs_check_trunc_cache_free_space(struct btrfs_root *root,
else
ret = 0;
spin_unlock(&rsv->lock);
return 0;
return ret;
}

int btrfs_truncate_free_space_cache(struct btrfs_root *root,
Expand Down

0 comments on commit 4b286cd

Please sign in to comment.