Commit 04242ff3 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov
Browse files

ceph: avoid repeatedly adding inode to mdsc->snap_flush_list

Otherwise, mdsc->snap_flush_list may get corrupted.

Signed-off-by: default avatar"Yan, Zheng" <>
Reviewed-by: default avatarIlya Dryomov <>
Signed-off-by: default avatarIlya Dryomov <>
parent 0fd3fd0a
......@@ -616,7 +616,8 @@ int __ceph_finish_cap_snap(struct ceph_inode_info *ci,
list_add_tail(&ci->i_snap_flush_item, &mdsc->snap_flush_list);
if (list_empty(&ci->i_snap_flush_item))
list_add_tail(&ci->i_snap_flush_item, &mdsc->snap_flush_list);
return 1; /* caller may want to ceph_flush_snaps */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment