hugetlbfs: prevent filesystem stacking of hugetlbfs
[linux-2.6-microblaze.git] / fs / hugetlbfs / inode.c
index 523954d..b5c1097 100644 (file)
@@ -1364,6 +1364,12 @@ hugetlbfs_fill_super(struct super_block *sb, struct fs_context *fc)
        sb->s_magic = HUGETLBFS_MAGIC;
        sb->s_op = &hugetlbfs_ops;
        sb->s_time_gran = 1;
+
+       /*
+        * Due to the special and limited functionality of hugetlbfs, it does
+        * not work well as a stacking filesystem.
+        */
+       sb->s_stack_depth = FILESYSTEM_MAX_STACK_DEPTH;
        sb->s_root = d_make_root(hugetlbfs_get_root(sb, ctx));
        if (!sb->s_root)
                goto out_free;