X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Finotify_user.c;h=7b94a1e3c015468b30e6343156053fd5e409afca;hb=a64e715fc74b1a7dcc5944f848acc38b2c4d4ee2;hp=e9c58652533aacddc9a81672421c1bde37a23f75;hpb=4ac9137858e08a19f29feac4e1f4df7c268b0ba5;p=~andy%2Flinux diff --git a/fs/inotify_user.c b/fs/inotify_user.c index e9c58652533..7b94a1e3c01 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; } @@ -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;