mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ceph: add missing locking to protect i_snap_realm_item during split
All ci->i_snap_realm_item/realm->inodes_with_caps manipulation should be protected by realm->inodes_with_caps_lock. This bug would have only bit us in a rare race with a realm split (during some snap creations). Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
978097c907
commit
052bb34af3
1 changed files with 2 additions and 0 deletions
|
@ -818,7 +818,9 @@ void ceph_handle_snap(struct ceph_mds_client *mdsc,
|
||||||
* queued (again) by ceph_update_snap_trace()
|
* queued (again) by ceph_update_snap_trace()
|
||||||
* below. Queue it _now_, under the old context.
|
* below. Queue it _now_, under the old context.
|
||||||
*/
|
*/
|
||||||
|
spin_lock(&realm->inodes_with_caps_lock);
|
||||||
list_del_init(&ci->i_snap_realm_item);
|
list_del_init(&ci->i_snap_realm_item);
|
||||||
|
spin_unlock(&realm->inodes_with_caps_lock);
|
||||||
spin_unlock(&inode->i_lock);
|
spin_unlock(&inode->i_lock);
|
||||||
|
|
||||||
ceph_queue_cap_snap(ci,
|
ceph_queue_cap_snap(ci,
|
||||||
|
|
Loading…
Reference in a new issue