Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
d21aa4fa
Unverified
Commit
d21aa4fa
authored
Jul 17, 2017
by
Li Feng
Committed by
Stéphane Graber
Aug 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue #1702, do remount with the MS_REMOUNT flag when mounts with MS_RDONLY
Signed-off-by:
Li Feng
<
lifeng68@huawei.com
>
parent
8273498c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
lxcdir.c
src/lxc/bdev/lxcdir.c
+6
-0
No files found.
src/lxc/bdev/lxcdir.c
View file @
d21aa4fa
...
@@ -150,6 +150,12 @@ int dir_mount(struct bdev *bdev)
...
@@ -150,6 +150,12 @@ int dir_mount(struct bdev *bdev)
src
=
lxc_storage_get_path
(
bdev
->
src
,
bdev
->
type
);
src
=
lxc_storage_get_path
(
bdev
->
src
,
bdev
->
type
);
ret
=
mount
(
src
,
bdev
->
dest
,
"bind"
,
MS_BIND
|
MS_REC
|
mntflags
,
mntdata
);
ret
=
mount
(
src
,
bdev
->
dest
,
"bind"
,
MS_BIND
|
MS_REC
|
mntflags
,
mntdata
);
if
((
0
==
ret
)
&&
(
mntflags
&
MS_RDONLY
))
{
DEBUG
(
"remounting %s on %s with readonly options"
,
src
?
src
:
"(none)"
,
bdev
->
dest
?
bdev
->
dest
:
"(none)"
);
ret
=
mount
(
src
,
bdev
->
dest
,
"bind"
,
MS_BIND
|
MS_REC
|
mntflags
|
MS_REMOUNT
,
mntdata
);
}
free
(
mntdata
);
free
(
mntdata
);
return
ret
;
return
ret
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment