diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2012-11-07 00:38:06 -0600 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-11-07 09:43:03 +0000 |
commit | 96e5d1d3adf56f1c7eeb07258f6a1a0a7ae9c489 (patch) | |
tree | ca5a7f4cf7508bc287af7b35b1d75e71d11f765b /arch/unicore32 | |
parent | 3d1626889a64bd5a661544d582036a0a02104a60 (diff) | |
download | linux-96e5d1d3adf56f1c7eeb07258f6a1a0a7ae9c489.tar.bz2 |
GFS2: Test bufdata with buffer locked and gfs2_log_lock held
In gfs2_trans_add_bh(), gfs2 was testing if a there was a bd attached to the
buffer without having the gfs2_log_lock held. It was then assuming it would
stay attached for the rest of the function. However, without either the log
lock being held of the buffer locked, __gfs2_ail_flush() could detach bd at any
time. This patch moves the locking before the test. If there isn't a bd
already attached, gfs2 can safely allocate one and attach it before locking.
There is no way that the newly allocated bd could be on the ail list,
and thus no way for __gfs2_ail_flush() to detach it.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'arch/unicore32')
0 files changed, 0 insertions, 0 deletions