mount: handle mnt_flags and sb_flags separatly (v4)

They both can container the MS_READONLY flag. And in one case it will be
read-only bind-mount and in another case it will be read-only
super-block.

v2: set mnt and sb for one call of mount() when it's posiable
v3: return a comment which was deleted by mistake
v4: Fix the sentense about restoring mnt flags
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin 2015-09-11 16:55:00 +03:00 committed by Pavel Emelyanov
parent b7d393ff63
commit 1174a2ad0f
4 changed files with 47 additions and 12 deletions

View file

@ -1089,7 +1089,7 @@ static int parse_mountinfo_ent(char *str, struct mount_info *new, char **fsname)
if (!new->options)
goto err;
if (parse_sb_opt(opt, &new->flags, new->options))
if (parse_sb_opt(opt, &new->sb_flags, new->options))
goto err;
ret = 0;