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/inotify.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/inotify.c')
-rw-r--r-- | fs/inotify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/inotify.c b/fs/inotify.c index 9fbaebfdf40b..bf7ce1d2412b 100644 --- a/fs/inotify.c +++ b/fs/inotify.c | |||
@@ -372,7 +372,7 @@ static int find_inode(const char __user *dirname, struct nameidata *nd) | |||
372 | if (error) | 372 | if (error) |
373 | return error; | 373 | return error; |
374 | /* you can only watch an inode if you have read permissions on it */ | 374 | /* you can only watch an inode if you have read permissions on it */ |
375 | error = permission(nd->dentry->d_inode, MAY_READ, NULL); | 375 | error = vfs_permission(nd, MAY_READ); |
376 | if (error) | 376 | if (error) |
377 | path_release(nd); | 377 | path_release(nd); |
378 | return error; | 378 | return error; |