aboutsummaryrefslogtreecommitdiff
path: root/fs/overlayfs/Makefile
diff options
context:
space:
mode:
authorGravatar Christian Brauner <brauner@kernel.org> 2023-06-16 15:53:58 +0300
committerGravatar Amir Goldstein <amir73il@gmail.com> 2023-06-19 14:02:01 +0300
commit1784fbc2ed9c888ea4e895f30a53207ed7ee8208 (patch)
treeb0fdaf26c53b91308b6e26f90d4d2d2bfad51242 /fs/overlayfs/Makefile
parentovl: factor out ovl_parse_options() helper (diff)
downloadlinux-1784fbc2ed9c888ea4e895f30a53207ed7ee8208.tar.gz
linux-1784fbc2ed9c888ea4e895f30a53207ed7ee8208.tar.bz2
linux-1784fbc2ed9c888ea4e895f30a53207ed7ee8208.zip
ovl: port to new mount api
We recently ported util-linux to the new mount api. Now the mount(8) tool will by default use the new mount api. While trying hard to fall back to the old mount api gracefully there are still cases where we run into issues that are difficult to handle nicely. Now with mount(8) and libmount supporting the new mount api I expect an increase in the number of bug reports and issues we're going to see with filesystems that don't yet support the new mount api. So it's time we rectify this. When ovl_fill_super() fails before setting sb->s_root, we need to cleanup sb->s_fs_info. The logic is a bit convoluted but tl;dr: If sget_fc() has succeeded fc->s_fs_info will have been transferred to sb->s_fs_info. So by the time ->fill_super()/ovl_fill_super() is called fc->s_fs_info is NULL consequently fs_context->free() won't call ovl_free_fs(). If we fail before sb->s_root() is set then ->put_super() won't be called which would call ovl_free_fs(). IOW, if we fail in ->fill_super() before sb->s_root we have to clean it up. Signed-off-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'fs/overlayfs/Makefile')
0 files changed, 0 insertions, 0 deletions