X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Finotify_user.c;h=6676c06bb7c16935b3a7fbc4615836f1dfb256fb;hb=79bc12a0a09c2eb1ccbb01c192045f994567bda2;hp=e9c58652533aacddc9a81672421c1bde37a23f75;hpb=4ac9137858e08a19f29feac4e1f4df7c268b0ba5;p=linux-2.6 diff --git a/fs/inotify_user.c b/fs/inotify_user.c index e9c5865253..6676c06bb7 100644 --- a/fs/inotify_user.c +++ b/fs/inotify_user.c @@ -367,7 +367,7 @@ static int find_inode(const char __user *dirname, struct nameidata *nd, /* you can only watch an inode if you have read permissions on it */ error = vfs_permission(nd, MAY_READ); if (error) - path_release(nd); + path_put(&nd->path); return error; } @@ -598,7 +598,7 @@ asmlinkage long sys_inotify_init(void) } ih = inotify_init(&inotify_user_ops); - if (unlikely(IS_ERR(ih))) { + if (IS_ERR(ih)) { ret = PTR_ERR(ih); goto out_free_dev; } @@ -676,7 +676,7 @@ asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, u32 mask) ret = create_watch(dev, inode, mask); mutex_unlock(&dev->up_mutex); - path_release(&nd); + path_put(&nd.path); fput_and_out: fput_light(filp, fput_needed); return ret;