mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-30 01:46:30 -05:00
19 lines
534 B
Diff
19 lines
534 B
Diff
diff --git a/fs/sdcardfs/main.c b/fs/sdcardfs/main.c
|
|
index a652228..8b51a12 100755
|
|
--- a/fs/sdcardfs/main.c
|
|
+++ b/fs/sdcardfs/main.c
|
|
@@ -223,6 +223,13 @@
|
|
atomic_inc(&lower_sb->s_active);
|
|
sdcardfs_set_lower_super(sb, lower_sb);
|
|
|
|
+ sb->s_stack_depth = lower_sb->s_stack_depth + 1;
|
|
+ if (sb->s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
|
|
+ pr_err("sdcardfs: maximum fs stacking depth exceeded\n");
|
|
+ err = -EINVAL;
|
|
+ goto out_sput;
|
|
+ }
|
|
+
|
|
/* inherit maxbytes from lower file system */
|
|
sb->s_maxbytes = lower_sb->s_maxbytes;
|
|
|