linux/fs/gfs2
Benjamin Marzinski 96e5d1d3ad 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>
2012-11-07 09:43:03 +00:00
..
acl.c
acl.h
aops.c GFS2: change function gfs2_direct_IO to use a normal gfs2_glock_dq 2012-09-24 10:47:06 +01:00
bmap.c GFS2: Add structure to contain rgrp, bitmap, offset tuple 2012-09-24 10:46:56 +01:00
bmap.h
dentry.c
dir.c
dir.h
export.c tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking 2012-10-09 23:33:55 -04:00
file.c GFS2: Don't call file_accessed() with a shared glock 2012-11-07 09:42:49 +00:00
gfs2.h
glock.c GFS2: Eliminate redundant calls to may_grant 2012-09-24 10:47:12 +01:00
glock.h
glops.c GFS2: fix s_writers.counter imbalance in gfs2_ail_empty_gl 2012-09-24 10:47:29 +01:00
glops.h
incore.h GFS2: Consolidate free block searching functions 2012-09-24 10:47:26 +01:00
inode.c GFS2: Consolidate free block searching functions 2012-09-24 10:47:26 +01:00
inode.h
Kconfig
lock_dlm.c
log.c
log.h
lops.c GFS2: Test bufdata with buffer locked and gfs2_log_lock held 2012-11-07 09:43:03 +00:00
lops.h
main.c
Makefile
meta_io.c
meta_io.h
ops_fstype.c GFS2: Get rid of I_MUTEX_QUOTA usage 2012-09-24 10:47:24 +01:00
quota.c GFS2: Fix an unchecked error from gfs2_rs_alloc 2012-11-07 09:40:05 +00:00
quota.h
recovery.c
recovery.h
rgrp.c GFS2: Fix FITRIM argument handling 2012-11-07 09:41:58 +00:00
rgrp.h GFS2: Consolidate free block searching functions 2012-09-24 10:47:26 +01:00
super.c GFS2: Don't call file_accessed() with a shared glock 2012-11-07 09:42:49 +00:00
super.h
sys.c
sys.h
trace_gfs2.h GFS2: Improve block reservation tracing 2012-09-24 10:47:20 +01:00
trans.c GFS2: Test bufdata with buffer locked and gfs2_log_lock held 2012-11-07 09:43:03 +00:00
trans.h GFS2: Remove rs_requested field from reservations 2012-09-24 10:46:54 +01:00
util.c
util.h
xattr.c GFS2: Remove rs_requested field from reservations 2012-09-24 10:46:54 +01:00
xattr.h