Make to_mnt_ns() static to address the following 'sparse' warning: fs/namespace.c:1731:22: warning: symbol 'to_mnt_ns' was not declared. Should it be static?
Unified · Split
| @@ -1728,7 +1728,7 @@ static bool is_mnt_ns_file(struct dentry *dentry) · 1727 unmodified lines | ||
| 1728 | 1728 | dentry->d_fsdata == &mntns_operations; |
| 1729 | 1729 | } |
| 1730 | 1730 | |
| 1731 | −struct mnt_namespace *to_mnt_ns(struct ns_common *ns) | |
| 1731 | +static struct mnt_namespace *to_mnt_ns(struct ns_common *ns) | |
| 1732 | 1732 | { |
| 1733 | 1733 | return container_of(ns, struct mnt_namespace, ns); |
| 1734 | 1734 | } |