fs: add file and path permissions helpers
[linux-2.6-microblaze.git] / fs / notify / inotify / inotify_user.c
index 59c1770..e1155d3 100644 (file)
@@ -352,7 +352,7 @@ static int inotify_find_inode(const char __user *dirname, struct path *path,
        if (error)
                return error;
        /* you can only watch an inode if you have read permissions on it */
-       error = inode_permission(path->dentry->d_inode, MAY_READ);
+       error = path_permission(path, MAY_READ);
        if (error) {
                path_put(path);
                return error;