diff options
Diffstat (limited to 'fs/inotify_user.c')
-rw-r--r-- | fs/inotify_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/inotify_user.c b/fs/inotify_user.c index e9c58652533a..7b94a1e3c015 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, | |||
367 | /* you can only watch an inode if you have read permissions on it */ | 367 | /* you can only watch an inode if you have read permissions on it */ |
368 | error = vfs_permission(nd, MAY_READ); | 368 | error = vfs_permission(nd, MAY_READ); |
369 | if (error) | 369 | if (error) |
370 | path_release(nd); | 370 | path_put(&nd->path); |
371 | return error; | 371 | return error; |
372 | } | 372 | } |
373 | 373 | ||
@@ -676,7 +676,7 @@ asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, u32 mask) | |||
676 | ret = create_watch(dev, inode, mask); | 676 | ret = create_watch(dev, inode, mask); |
677 | mutex_unlock(&dev->up_mutex); | 677 | mutex_unlock(&dev->up_mutex); |
678 | 678 | ||
679 | path_release(&nd); | 679 | path_put(&nd.path); |
680 | fput_and_out: | 680 | fput_and_out: |
681 | fput_light(filp, fput_needed); | 681 | fput_light(filp, fput_needed); |
682 | return ret; | 682 | return ret; |