.. | .. |
---|
713 | 713 | fc->pid_ns = get_pid_ns(task_active_pid_ns(current)); |
---|
714 | 714 | fc->user_ns = get_user_ns(user_ns); |
---|
715 | 715 | fc->max_pages = FUSE_DEFAULT_MAX_PAGES_PER_REQ; |
---|
| 716 | + fc->max_pages_limit = FUSE_MAX_MAX_PAGES; |
---|
716 | 717 | |
---|
717 | 718 | INIT_LIST_HEAD(&fc->mounts); |
---|
718 | 719 | list_add(&fm->fc_entry, &fc->mounts); |
---|
.. | .. |
---|
1059 | 1060 | fc->abort_err = 1; |
---|
1060 | 1061 | if (arg->flags & FUSE_MAX_PAGES) { |
---|
1061 | 1062 | fc->max_pages = |
---|
1062 | | - min_t(unsigned int, FUSE_MAX_MAX_PAGES, |
---|
| 1063 | + min_t(unsigned int, fc->max_pages_limit, |
---|
1063 | 1064 | max_t(unsigned int, arg->max_pages, 1)); |
---|
1064 | 1065 | } |
---|
1065 | 1066 | if (IS_ENABLED(CONFIG_FUSE_DAX) && |
---|
.. | .. |
---|
1617 | 1618 | struct fuse_mount *fm = get_fuse_mount_super(sb); |
---|
1618 | 1619 | bool last; |
---|
1619 | 1620 | |
---|
1620 | | - if (fm) { |
---|
| 1621 | + if (sb->s_root) { |
---|
1621 | 1622 | last = fuse_mount_remove(fm); |
---|
1622 | 1623 | if (last) |
---|
1623 | 1624 | fuse_conn_destroy(fm); |
---|