mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
vfs: syscall: Add move_mount(2) to move mounts around
Add a move_mount() system call that will move a mount from one place to another and, in the next commit, allow to attach an unattached mount tree. The new system call looks like the following: int move_mount(int from_dfd, const char *from_path, int to_dfd, const char *to_path, unsigned int flags); Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-api@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
a07b200047
commit
2db154b3ea
8 changed files with 131 additions and 33 deletions
|
@ -866,6 +866,11 @@ int security_add_mnt_opt(const char *option, const char *val, int len,
|
|||
}
|
||||
EXPORT_SYMBOL(security_add_mnt_opt);
|
||||
|
||||
int security_move_mount(const struct path *from_path, const struct path *to_path)
|
||||
{
|
||||
return call_int_hook(move_mount, 0, from_path, to_path);
|
||||
}
|
||||
|
||||
int security_inode_alloc(struct inode *inode)
|
||||
{
|
||||
int rc = lsm_inode_alloc(inode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue