summaryrefslogtreecommitdiff
path: root/fs/inotify_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/inotify_user.c')
-rw-r--r--fs/inotify_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/inotify_user.c b/fs/inotify_user.c
index fe79c25d95dc..9b99ebf28884 100644
--- a/fs/inotify_user.c
+++ b/fs/inotify_user.c
@@ -365,7 +365,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 = vfs_permission(nd, MAY_READ);
+ error = inode_permission(nd->path.dentry->d_inode, MAY_READ);
if (error)
path_put(&nd->path);
return error;