diff options
author | 2013-07-02 12:40:19 +0800 | |
---|---|---|
committer | 2013-07-03 15:32:56 -0700 | |
commit | b415bf4f9fe25f39934f5c464125e4a2dffb6d08 (patch) | |
tree | f38df9c1746a1419e7942afb4534625175a5d353 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | ceph: avoid accessing invalid memory (diff) | |
download | linux-dev-b415bf4f9fe25f39934f5c464125e4a2dffb6d08.tar.xz linux-dev-b415bf4f9fe25f39934f5c464125e4a2dffb6d08.zip |
ceph: fix pending vmtruncate race
The locking order for pending vmtruncate is wrong, it can lead to
following race:
write wmtruncate work
------------------------ ----------------------
lock i_mutex
check i_truncate_pending check i_truncate_pending
truncate_inode_pages() lock i_mutex (blocked)
copy data to page cache
unlock i_mutex
truncate_inode_pages()
The fix is take i_mutex before calling __ceph_do_pending_vmtruncate()
Fixes: http://tracker.ceph.com/issues/5453
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions