OSDN Git Service

GFS2: Combine gfs2_free_di with gfs2_free_uninit_di
authorBob Peterson <rpeterso@redhat.com>
Wed, 22 Nov 2017 15:24:14 +0000 (09:24 -0600)
committerBob Peterson <rpeterso@redhat.com>
Mon, 27 Nov 2017 16:47:14 +0000 (10:47 -0600)
commita18c78c5f5e39978231cb30f037bdb634cd98f6c
tree06edaa41478fd8e959f5989e2f985768820bc58d
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323
GFS2: Combine gfs2_free_di with gfs2_free_uninit_di

Before this patch, function gfs2_free_di was 4 lines of code, and
one of those lines was to call gfs2_free_uninit_di. Although
unlikely, if function gfs2_free_uninit_di encountered an error
finding the block to be freed, the error was silently ignored by the
caller, which went ahead and improperly did a quota-change operation
and meta_wipe despite the error. This patch combines the two
functions into one to make the code more readable and fixes the bug
by returning from the combined function before it takes those next
incorrect steps.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/rgrp.c