Message ID | 20180804131057.9967-5-lufq.fnst@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | some trivial cleanup about btrfs_delete_subvolume | expand |
On Sat, Aug 04, 2018 at 09:10:56PM +0800, Lu Fengqi wrote: > Since ret must be 0 here, don't have to return separately in advance. > > No functional change. > > Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Added to misc-next too, the change is fairly trivial so I was pondering about code readability impacts, but it's ok.
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 4fb20f77d6b1..8bebf122d4b3 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -5539,10 +5539,8 @@ int btrfs_block_rsv_add(struct btrfs_root *root, return 0; ret = reserve_metadata_bytes(root, block_rsv, num_bytes, flush); - if (!ret) { + if (!ret) block_rsv_add_bytes(block_rsv, num_bytes, true); - return 0; - } return ret; }
Since ret must be 0 here, don't have to return separately in advance. No functional change. Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> --- fs/btrfs/extent-tree.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)