]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Add missing else in trans_add_meta/data
authorBob Peterson <rpeterso@redhat.com>
Thu, 1 Oct 2015 16:47:31 +0000 (11:47 -0500)
committerBob Peterson <rpeterso@redhat.com>
Thu, 1 Oct 2015 17:00:59 +0000 (12:00 -0500)
commit93c0e453aea68a59a287a24e2165b107143e7f26
tree710667725821e752d23d6bb1b829bbe6cee0b958
parent57128d28939f6dcc88fade6386975da65d4959ef
gfs2: Add missing else in trans_add_meta/data

This patch fixes a timing window that causes a segfault.
The problem is that bd can remain NULL throughout the function
and then reference that NULL pointer if the bh->b_private starts
out NULL, then someone sets it to non-NULL inside the locking.
In that case, bd still needs to be set.

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