]> git.baikalelectronics.ru Git - kernel.git/commit
orangefs: fix orangefs_superblock locking
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Mar 2016 23:56:34 +0000 (19:56 -0400)
committerMike Marshall <hubcap@omnibond.com>
Sat, 26 Mar 2016 11:22:00 +0000 (07:22 -0400)
commite019edf570dbdb0419d6c2f562210afcc06bb7d3
tree3ee74b07ce43cdb0b637c3747fadbb1f2ba59eb6
parent5a2bdaf0ac6c75aca5c243471f1f7738522c17b9
orangefs: fix orangefs_superblock locking

* switch orangefs_remount() to taking ORANGEFS_SB(sb) instead of sb
* remove from the list _before_ orangefs_unmount() - request_mutex
in the latter will make sure that nothing observed in the loop in
ORANGEFS_DEV_REMOUNT_ALL handling will get freed until the end
of loop
* on removal, keep the forward pointer and zero the back one.  That
way we can drop and regain the spinlock in the loop body (again,
ORANGEFS_DEV_REMOUNT_ALL one) and still be able to get to the
rest of the list.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/devorangefs-req.c
fs/orangefs/orangefs-kernel.h
fs/orangefs/super.c