summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2022-02-19 14:56:17 +0800
committerIlya Dryomov <idryomov@gmail.com>2022-03-01 18:26:37 +0100
commit74a31df4f1f16807a93e414a322baf6eceddb60d (patch)
treeb015b33598f76d03cbd442985e788885bd219aa7 /fs/ceph/super.h
parent2e586641c950e7f3e7e008404bd783a466b9b590 (diff)
downloadlinux-74a31df4f1f16807a93e414a322baf6eceddb60d.tar.gz
linux-74a31df4f1f16807a93e414a322baf6eceddb60d.tar.bz2
linux-74a31df4f1f16807a93e414a322baf6eceddb60d.zip
ceph: eliminate the recursion when rebuilding the snap context
Use a list instead of recursion to avoid possible stack overflow. Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index a2caa7beca4f..ef9f32ec905e 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -883,6 +883,8 @@ struct ceph_snap_realm {
struct list_head dirty_item; /* if realm needs new context */
+ struct list_head rebuild_item; /* rebuild snap realms _downward_ in hierarchy */
+
/* the current set of snaps for this realm */
struct ceph_snap_context *cached_context;