diff options
author | Zhang Huan <zhanghuan@open-fs.com> | 2017-09-05 11:36:25 +0800 |
---|---|---|
committer | jiffin tony Thottan <jthottan@redhat.com> | 2017-10-25 11:36:23 +0000 |
commit | 5b6989dee28b64ddf2e184708c8d53762d665963 (patch) | |
tree | 38eca8f1d92ba9a567a013b51960ab08c3c67ee0 /libglusterfs | |
parent | d7006089177d4ff73674ebe84ace651a3457f358 (diff) |
cluster/dht: fix crash when deleting directories
In DHT, after locks on all subvolumes are acquired, it would perform the
following steps sequentially,
1. send remove dir on all other subvolumes except the hashed one in a loop;
2. wait for all pending rmdir to be done
3. remove dir on the hashed subvolume
The problem is that in step 1 there is a check to skip hashed subvolume
in the loop. If the last subvolume to check is actually the
hashed one, and step 3 is quickly done before the last and hashed
subvolume is checked, by accessing shared context data be destroyed in
step 3, would cause a crash.
Fix by saving shared data in a local variable to access later in the
loop.
> BUG: 1490642
> Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
(cherry picked from commit 206120126d455417a81a48ae473d49be337e9463)
Change-Id: I8db7cf7cb262d74efcb58eb00f02ea37df4be4e2
BUG: 1505221
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'libglusterfs')
0 files changed, 0 insertions, 0 deletions