WSL2-Linux-Kernel/fs/ocfs2
Xue jiufei ac4fef4d23 ocfs2/dlm: do not purge lockres that is queued for assert master
When workqueue is delayed, it may occur that a lockres is purged while it
is still queued for master assert.  it may trigger BUG() as follows.

N1                                         N2
dlm_get_lockres()
->dlm_do_master_requery
                                  is the master of lockres,
                                  so queue assert_master work

                                  dlm_thread() start running
                                  and purge the lockres

                                  dlm_assert_master_worker()
                                  send assert master message
                                  to other nodes
receiving the assert_master
message, set master to N2

dlmlock_remote() send create_lock message to N2, but receive DLM_IVLOCKID,
if it is RECOVERY lockres, it triggers the BUG().

Another BUG() is triggered when N3 become the new master and send
assert_master to N1, N1 will trigger the BUG() because owner doesn't
match.  So we should not purge lockres when it is queued for assert
master.

Signed-off-by: joyce.xue <xuejiufei@huawei.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-23 16:47:45 -07:00
..
cluster ocfs2/o2net: incorrect to terminate accepting connections loop upon rejecting an invalid one 2014-06-10 15:34:46 -07:00
dlm ocfs2/dlm: do not purge lockres that is queued for assert master 2014-06-23 16:47:45 -07:00
dlmfs
Kconfig
Makefile
acl.c
acl.h
alloc.c ocfs2: fix umount hang while shutting down truncate log 2014-06-04 16:53:54 -07:00
alloc.h
aops.c switch {__,}blockdev_direct_IO() to iov_iter 2014-05-06 17:32:46 -04:00
aops.h
blockcheck.c
blockcheck.h
buffer_head_io.c
buffer_head_io.h
dcache.c
dcache.h
dir.c
dir.h
dlmglue.c ocfs2: remove some unused code 2014-06-04 16:53:55 -07:00
dlmglue.h
export.c
export.h
extent_map.c
extent_map.h
file.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-06-12 10:30:18 -07:00
file.h
heartbeat.c
heartbeat.h
inode.c
inode.h
ioctl.c fs/ocfs2/ioctl.c: add static to local functions 2014-06-04 16:53:54 -07:00
ioctl.h
journal.c ocfs2: limit printk when journal is aborted 2014-06-04 16:53:54 -07:00
journal.h
localalloc.c
localalloc.h
locks.c
locks.h
mmap.c
mmap.h
move_extents.c
move_extents.h
namei.c ocfs2: manually do the iput once ocfs2_add_entry failed in ocfs2_symlink and ocfs2_mknod 2014-06-23 16:47:45 -07:00
namei.h
ocfs1_fs_compat.h
ocfs2.h ocfs2: fix umount hang while shutting down truncate log 2014-06-04 16:53:54 -07:00
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h ocfs2: fix a tiny race when running dirop_fileop_racer 2014-06-23 16:47:45 -07:00
quota.h
quota_global.c
quota_local.c
refcounttree.c ocfs2: refcount: take rw_lock in ocfs2_reflink 2014-06-23 16:47:45 -07:00
refcounttree.h
reservations.c
reservations.h
resize.c ocfs2: fix incorrect i_size of global bitmap inode after resize 2014-06-04 16:53:54 -07:00
resize.h
slot_map.c
slot_map.h
stack_o2cb.c
stack_user.c
stackglue.c ocfs2: remove NULL assignments on static 2014-06-04 16:53:53 -07:00
stackglue.h
suballoc.c
suballoc.h
super.c ocfs2: revert "ocfs2: fix NULL pointer dereference when dismount and ocfs2rec simultaneously" 2014-06-23 16:47:45 -07:00
super.h
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c ocfs2: remove NULL assignments on static 2014-06-04 16:53:53 -07:00
uptodate.h
xattr.c
xattr.h