VFS: Split inode_permission()

Split inode_permission() into inode- and superblock-dependent parts.

This is aimed at unionmounts where the superblock from the upper layer has to
be checked rather than the superblock from the lower layer as the upper layer
may be writable, thus allowing an unwritable file from the lower layer to be
copied up and modified.

Original-author: Valerie Aurora <vaurora@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com> (Further development)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
David Howells
2012-06-25 12:55:46 +01:00
committed by Al Viro
parent 9249e17fe0
commit 0bdaea9017
2 changed files with 54 additions and 17 deletions

View File

@@ -41,6 +41,11 @@ static inline int __sync_blockdev(struct block_device *bdev, int wait)
*/
extern void __init chrdev_init(void);
/*
* namei.c
*/
extern int __inode_permission(struct inode *, int);
/*
* namespace.c
*/