]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't send null bp to xfs_trans_brelse()
authorEric Sandeen <sandeen@sandeen.net>
Wed, 1 Oct 2014 23:23:49 +0000 (09:23 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 1 Oct 2014 23:23:49 +0000 (09:23 +1000)
commit7253762e88a2cc59ff19ff9ce57d7ab7fb49f4de
tree07fd39c605fbfd6bb17fe348730d664b11c18fd2
parentf19fbd5a4b43a4e5507010144789c8c7a4c44f32
xfs: don't send null bp to xfs_trans_brelse()

In this case, if bp is NULL, error is set, and we send a
NULL bp to xfs_trans_brelse, which will try to dereference it.

Test whether we actually have a buffer before we try to
free it.

Coverity spotted this.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_da_btree.c