diff options
author | Christoph Hellwig <hch@lst.de> | 2005-11-09 00:35:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:55:58 -0500 |
commit | e4543eddfd3bf3e0d625841377fa695a519edfd4 (patch) | |
tree | b62546cb0038529bd8cd583333c556ad799f2081 /fs/namespace.c | |
parent | e4a53cbabc81f04e24a5570b4aa6a6384bdbfc67 (diff) |
[PATCH] add a vfs_permission helper
Most permission() calls have a struct nameidata * available. This helper
takes that as an argument and thus makes sure we pass it down for lookup
intents and prepares for per-mount read-only support where we need a struct
vfsmount for checking whether a file is writeable.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index caa9187f67e5..2019899f2ab8 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -637,7 +637,7 @@ static int mount_is_safe(struct nameidata *nd) | |||
637 | if (current->uid != nd->dentry->d_inode->i_uid) | 637 | if (current->uid != nd->dentry->d_inode->i_uid) |
638 | return -EPERM; | 638 | return -EPERM; |
639 | } | 639 | } |
640 | if (permission(nd->dentry->d_inode, MAY_WRITE, nd)) | 640 | if (vfs_permission(nd, MAY_WRITE)) |
641 | return -EPERM; | 641 | return -EPERM; |
642 | return 0; | 642 | return 0; |
643 | #endif | 643 | #endif |