summaryrefslogtreecommitdiff
path: root/fs/inotify.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-11-08 21:35:04 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 07:55:58 -0800
commite4543eddfd3bf3e0d625841377fa695a519edfd4 (patch)
treeb62546cb0038529bd8cd583333c556ad799f2081 /fs/inotify.c
parente4a53cbabc81f04e24a5570b4aa6a6384bdbfc67 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/inotify.c b/fs/inotify.c
index 9fbaebfdf40..bf7ce1d2412 100644
--- a/fs/inotify.c
+++ b/fs/inotify.c
@@ -372,7 +372,7 @@ static int find_inode(const char __user *dirname, struct nameidata *nd)
if (error)
return error;
/* you can only watch an inode if you have read permissions on it */
- error = permission(nd->dentry->d_inode, MAY_READ, NULL);
+ error = vfs_permission(nd, MAY_READ);
if (error)
path_release(nd);
return error;