gfs2: bufdata locking fix

The locking in gfs2_trans_add_data() and gfs2_trans_add_meta() is weird;
it doesn't follow the usual coding pattern of checking bh->b_private
under lock, allocating a new bufdata object with the locks dropped, and
re-checking once the lock is reacquired.  Both functions set
bh->b_private without holding a lock on the buffer.  Even more weirdly,
gfs2_trans_add_meta() allocates and sets bh->b_private under the page
lock.  This behavior has essentially existed since day one, but it makes
no sense.

Fix this by switching to the usual coding pattern and getting rid of the
page locking in gfs2_trans_add_meta().

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 file changed