aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inotify.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/inotify.c')
-rw-r--r--fs/inotify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/inotify.c b/fs/inotify.c
index a37e9fb1da58..bf7ce1d2412b 100644
--- a/fs/inotify.c
+++ b/fs/inotify.c
@@ -176,6 +176,7 @@ static inline void put_inotify_dev(struct inotify_device *dev)
176 if (atomic_dec_and_test(&dev->count)) { 176 if (atomic_dec_and_test(&dev->count)) {
177 atomic_dec(&dev->user->inotify_devs); 177 atomic_dec(&dev->user->inotify_devs);
178 free_uid(dev->user); 178 free_uid(dev->user);
179 idr_destroy(&dev->idr);
179 kfree(dev); 180 kfree(dev);
180 } 181 }
181} 182}
@@ -371,7 +372,7 @@ static int find_inode(const char __user *dirname, struct nameidata *nd)
371 if (error) 372 if (error)
372 return error; 373 return error;
373 /* you can only watch an inode if you have read permissions on it */ 374 /* you can only watch an inode if you have read permissions on it */
374 error = permission(nd->dentry->d_inode, MAY_READ, NULL); 375 error = vfs_permission(nd, MAY_READ);
375 if (error) 376 if (error)
376 path_release(nd); 377 path_release(nd);
377 return error; 378 return error;